-
-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Override incorrect dotnet paths in EtoSpecialFolders #2098
Conversation
- Use XDG_DOWNLOAD_DIR on Linux for EtoSpecialFolder.Downloads (Fix picoe#2096) and the hardcoded download path for Mac - Use XDG_DOCUMENT_DIR on Linux for EtoSpecialFolder.Documents and the harcoded download folder for Mac - Return XDG_CONFIG_HOME for EtoSpecialFolder.ApplicationSettings on Linux and HOME/Library/Preferences for Mac - update some documentation
While the currently returned folders are definitely not correct, I'm not sure if this change is great for a 2.x release - it will break all applications that assume e.g. a config file has been written in Independent of the version this will be merged into, all those applications would need some some sort of (platform dependant) upgrade code that has to replicate Eto's old behaviour to be able to migrate old settings files etc. I'm not quite sure how this should be addressed... |
Something that could probably help with this, is to not replace the original values. At the end of the day, it's up to @cwensley though to decide how this should be handled. |
Also fixed a case where the XDG_User_Dir was not considered disabled and didn't use the fallback.
Took cwensley's suggestion in glitter/matrix and implemented a variable that determines now if the new folders should get returned or the legacy ones. |
Yes, that solution sounds reasonable to me. 👍🏻 |
Thanks @Miepee for the PR! It looks great! |
Note:
You can apparently rename core user folders in windows, and windows does update them somewhere in the registry. Thus, for EtoSpecialFolder.Downloads it would be more accurate to fetch the downloads folder from the registry.
The exact key is in
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\{374DE290-123F-4565-9164-39C4925E467B}
, however there's also a really neat warning with!Do not use this registry key - Use the SHGetFolderPath or SHGetKnownFolderPath function instead
🙃