Node Webkit User/Home Path - drive letter?

0 favourites
  • 3 posts
From the Asset Store
Node Downloader is a plugin for download file for Construct 3 and construct 2 game engine
  • Hello,

    I came up with an issue about paths in NodeWebkit infterface, but I'm not sure if this can be considered a bug, or maybe I'm just doing something wrong?

    When you query NodeWebkit plugin about the User Folder / Home Directory path, on Windows, your'e getting something like:

    (Win8 output)

    \Users\UserName

    The problem is, it does not contain drive name! So, when I run the application *with unpacked resources* (= with package.nw unpacked and deleted), this is the only case when the app actually runs from within the folder where I call it from. Now, when I call it fro D drive (or any non-sytem drive), any calls to user folder end up referencing the local drive!

    This effect is invisible in preview, it is invisible when running the app right after export, but it persists if you use unpacked resources (as I do, having 300Mb+ of audio/graphics). In a "typical" case the NodeWebkit will first unpack package.nw to a temp directory on a system drive, so the problem will not be visible either.

    Any suggestions on how to deal with it? The only idea I came up with is checking if 2nd character in path is ":", and if not, add "C:", but that would be hard coding, which is a bad idea anyway :-(

    Thanks for all suggestions,

    Greg

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hmm... post a bug report for this and I'll see if I can add the drive letter to the path. I think it's because node-webkit is designed to be multiplatform, and that's what file paths look like on Mac and Linux (no drive letter).

  • Thanks so much, Ashley !

    I have a crazy time this week, so I'll probably do it during the weekend.

    All the best,

    Greg

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)