PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

Can't open folder %homepath%\AppData\Local\Microsoft\PowerToys\PowerToys Run\Settings\

Open frankyuan opened this issue 2 years ago • 4 comments

Microsoft PowerToys version

"0.60.1"

Running as admin

  • [ ] Yes

Area(s) with issue?

PowerToys Run

Steps to reproduce

  • Open PowerToys Run
  • Paste "%homepath%\AppData\Local\Microsoft\PowerToys\PowerToys Run\Settings" in the box and press Enter
  • Expect: The folder "%homepath%\AppData\Local\Microsoft\PowerToys\PowerToys Run\Settings" should be opened in the file explorer. Actual: The Chrome browser opened and searched using the above string.

✔️ Expected Behavior

The folder "%homepath%\AppData\Local\Microsoft\PowerToys\PowerToys Run\Settings" should be opened in the file explorer.

❌ Actual Behavior

The Chrome browser opened and searched using the above string.

Other Software

No response

frankyuan avatar Jul 14 '22 12:07 frankyuan

By the way, the "RememberLastLaunchLocation" setting should be exposed to the user, so don't need to change the setting manually (every time after the PowerToys upgrade).

frankyuan avatar Jul 14 '22 12:07 frankyuan

I can repro this. Looks like the %homepath% query is not well received by the folder plugin.

jaimecbernardo avatar Jul 14 '22 14:07 jaimecbernardo

I'll take a look on this one.

sosssego avatar Jul 14 '22 14:07 sosssego

Hi @sosssego In my machine HOMEPATH is set to \Users\david. I suppose we are not properly expanding environment variables that starts with /, \ or ~. https://github.com/microsoft/PowerToys/blob/3d8fbd0507781e18ce0b894599a2df3cbb670d7f/src/modules/launcher/Plugins/Microsoft.Plugin.Folder/Sources/Path/FolderHelper.cs#L80

davidegiacometti avatar Jul 14 '22 19:07 davidegiacometti