Tuesday 30 May 2017

Windows Store (.appx) bundled nw.js app can't access real filesystem

I made a nw.js app, bundled into an .appx and published to the Windows Store.

After strange behavior, I decided to publish an update with the SDK version so I could debug.

I did the following:

  1. created a file in the user's desktop via require('fs').writeFile
  2. successfully read the contents I just wrote via require('fs').readFile
  3. noticed that the file did not exist in the actual desktop

Is there a virtual filesystem for each Windows Store app? Can this be configured in the manifest? How can I access the real filesystem?

Sidenote: I tried running a batch file using require('child_process').exec and use a batch script to write to the real filesystem and it worked. However I would prefer a cleaner solution.



via Kosmas Papadatos

No comments:

Post a Comment