-
-
Notifications
You must be signed in to change notification settings - Fork 455
Fix bugs in explorer plugin #1817
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
Conversation
This comment has been minimized.
This comment has been minimized.
|
Please update description with what you have tested :) |
Plugins/Flow.Launcher.Plugin.Explorer/Search/EnvironmentVariables.cs
Outdated
Show resolved
Hide resolved
| excludedPath => r.SubTitle.StartsWith(excludedPath.Path, StringComparison.OrdinalIgnoreCase))); | ||
| excludedPath => IsSubPathOf(r.SubTitle, excludedPath.Path))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the issue with this check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a path string starts with another doesn't necessarily mean it's contains the other one (unless ending with slash is guaranteed). like c:\program files and c:\program
|
@z1nc0r3 just a FYI the issue with ':' is addressed here already. |
that's a bit different. that pr was to ignore queries with ':'. this one is to fix the crash issue. |
Just found something interesting. If you create a folder called Edit: Only expand when matching |
Co-authored-by: Jeremy Wu <[email protected]>
Parse environment variables before checking path existence
What about check whether the path exists before expanding environmental variable? |
Expanding is before checking the path is incomplete (user inputting and without trailing '\'). For this bug this pr is enough imo. Even Windows Explorer can't deal with this situation perfectly. |
lol ok |
It can be done but I don't really want to do it. In this pr @kubalav 's path should be correctly parsed. but paths like d:%appdata% still can't be handled correctly. |
| /// </summary> | ||
| /// <param name="path"></param> | ||
| /// <returns></returns> | ||
| public static string EnsureTrailingSlash(this string path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, this will be helpful because through out explorer there are dup code to add trailing slash.
Changes:
Tests: