Description
When using Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), the name of the documents folder is localized is sometimes returned, when the actual full path shold be what's returned.
Reproduction Steps
- have documents folder redirected to onedrive.
- have multibyte characters in the localized name
- use Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) to fetch the path.
Expected behavior
It should return the actual and correct full utf-16 path to MyDocuments specialfolder into the .net string, ready for use
Actual behavior
Instead, you get the localized folder name from the desktop.ini present in the folder, and, at least if it's Cyrillic, the backslash before the folder name disappears.
Regression?
It probably is a regression, but i have no idea when it started, so that doesnt' matter.
Known Workarounds
Actually read the windows environment variables directly and fetch the real path that way.
Configuration
.NET 9.0.10
Windows 11 x64
I believe this affects all version of windows that have the localized folder names feature.
Other information
app showing the bug is here.
https://github.com/tsunamods-codes/7th-Heaven
Description
When using Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), the name of the documents folder is localized is sometimes returned, when the actual full path shold be what's returned.
Reproduction Steps
Expected behavior
It should return the actual and correct full utf-16 path to MyDocuments specialfolder into the .net string, ready for use
Actual behavior
Instead, you get the localized folder name from the desktop.ini present in the folder, and, at least if it's Cyrillic, the backslash before the folder name disappears.
Regression?
It probably is a regression, but i have no idea when it started, so that doesnt' matter.
Known Workarounds
Actually read the windows environment variables directly and fetch the real path that way.
Configuration
.NET 9.0.10
Windows 11 x64
I believe this affects all version of windows that have the localized folder names feature.
Other information
app showing the bug is here.
https://github.com/tsunamods-codes/7th-Heaven