nw.js icon indicating copy to clipboard operation
nw.js copied to clipboard

[0.13.4-sdk] App.dataPath returns a path with a directory named default at the end

Open Dineshs91 opened this issue 9 years ago • 9 comments

OS: Mac OS X (El captain) nw.js version: 0.13.4-sdk

App.dataPath is returning ~/Library/Application Support/<name>/Default while the docs say it should return ~/Library/Application Support/<name>

The name of the package from package.json is devlog.

image

There is a directory named Default in that location and has files related to preferences, cookies etc.

Dineshs91 avatar Apr 09 '16 06:04 Dineshs91

Confirming this on Windows 10 x64 nw.js 0.13.2-sdk. nw.App.dataPath returns %LOCALAPPDATA%/<name>/User Data/Default. Should be %LOCALAPPDATA%/<name>.

artch avatar Apr 11 '16 16:04 artch

Same thing here on Ubuntu 15.04 x64 with nw.js 0.13.4-sdk.

rribou avatar Apr 12 '16 07:04 rribou

Same behaviour in [email protected]

Dineshs91 avatar May 01 '16 06:05 Dineshs91

same behavior in nw0.14.2-sdk. I have noticed one more thing on Mac. In nw0.12.3 folders like 'Local Storage', 'GPU Cache' were created in 'library/Application Support/[app name]/' but, from nw0.13 onwards they are getting created in 'library/Application Support/[app name]/Default/'. So this may be the reason of why App.dataPath is returning the new path. It's just an observation. I haven't thoroughly looked into it.

RohitSharma27 avatar May 01 '16 10:05 RohitSharma27

0.14.4-sdk LTS - still an issue on Windows 10 x64.

artch avatar May 11 '16 11:05 artch

why is this changed indeed? We have User Data/Default at the end, like:

on Windows 10

C:\Users[username]\AppData\Local[app name]\User Data\Default

while it use to be:

C:\Users[username]\AppData\Local[app name]\

Now we have to run some manual migration ...

gpetrov avatar Jun 09 '16 10:06 gpetrov

As chromium does, stores all the application data in the default profile folder.

vzamanillo avatar Jun 17 '16 21:06 vzamanillo

App.dataPath returns a path with a directory named Default at the end on nwjs 0.21.6.

Christywl avatar Apr 19 '17 07:04 Christywl

This issue is still present in v0.90.0. Since this has been the behavior since v0.13.0, should the docs be updated to mark this as the default behaviour?

ayushmanchhabra avatar Aug 18 '24 11:08 ayushmanchhabra