aspnet / LibraryManager

MIT License
455 stars 80 forks source link

Revisit LibraryManager folder structure for app data #636

Open ariellourenco opened 3 years ago

ariellourenco commented 3 years ago

On Windows, applications should not be creating folders/files directly in %USERPROFILE%. The proper location for configuration files is %APPDATA%\\ and the proper location for cache files is %LOCALAPPDATA%\<vendor>\<product>. Things should only be added to %USERPROFILE% if the user explicitly requests it via a save dialog box.

Please move %USERPROFILE%\.librarymanager to %APPDATA%\librarymanager as the default location. The fact that configuration files should go in %APPDATA% is well documented in Microsoft's OS documentation in a number of places as well as MSDN. Also, in Windows folders should not be named with a . prefix as Windows explorer doesn't allow creation of folders with that name which leads to problems.

related to: microsoft/vscode#3884

diogocp commented 3 years ago

https://github.com/aspnet/LibraryManager/blob/03883694a47bf3391ef68555cac7f69e8011ac5f/src/LibraryManager/Configuration/Settings.cs#L86-L99

jcotton42 commented 2 years ago

Should note that the current placement isn't valid on macOS or Linux either. On macOS it should be somewhere under ~/Library, and on Linux it should be in the appropriate XDG directory https://wiki.archlinux.org/title/XDG_Base_Directory