-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[OPTIMIZATION] Use %LocalAppData% instead of hardcoded paths #5298
Comments
It already does use the indirect path to LOCALAPPDATA through the KNOWNFOLDERID Shell API, and does not build an absolute path winget-cli/src/AppInstallerCommonCore/Runtime.cpp Lines 191 to 200 in a3cea27
winget-cli/src/AppInstallerSharedLib/Filesystem.cpp Lines 310 to 315 in a3cea27
|
@Trenly |
@o3wiz - But isn't that the way it should be? Imagine the case where a package is installed with WinGet, then a user changes where |
I'm not sure that's a realistic scenario; after all, changing %LocalAppData% manually seems unusual. A more common case might be if the user changes their username, causing hardcoded paths to break. |
I see. . . |
@Trenly For example:
It seems as if having a space in the username was not considered, or purposely left out. |
PathUnExpandEnvStrings |
Description of the new feature / enhancement
Winget currently installs packages to the absolute path:
Instead, using
%LocalAppData%
would improve flexibility and compatibility:Proposed technical implementation details
No response
The text was updated successfully, but these errors were encountered: