Flow.Launcher icon indicating copy to clipboard operation
Flow.Launcher copied to clipboard

Support \\ in explorer plugin

Open cibere opened this issue 9 months ago • 7 comments

Is your feature request related to a problem? Please describe.

When copy pasting a path from my python log file or console, sometimes it prints with the \\ separator

Describe the solution you'd like

Have flow automatically convert \\ to \, similar to the PR that converts / to \

Describe alternatives you've considered

Manually replace \\ with \

Additional context

Add any other context or screenshots about the feature request here.

cibere avatar Feb 22 '25 21:02 cibere

I’ve noticed that D:\source\\repos\\Flow.Launcher\\ works correctly for me. Could you please clarify the issue you’re encountering?

Image

Jack251970 avatar Feb 23 '25 02:02 Jack251970

I’ve noticed that D:\source\\repos\\Flow.Launcher\\ works correctly for me. Could you please clarify the issue you’re encountering?

I should back to my laptop tomorrow, but iirc, my paths always started with C:\\Users\\something\\else, so perhaps the issue is with the double backslash right after the drive letter?

I can do some testing tomorrow, I just wanted to create this issue before i forgot again

cibere avatar Feb 23 '25 03:02 cibere

I’ve noticed that D:\source\\repos\\Flow.Launcher\\ works correctly for me. Could you please clarify the issue you’re encountering?

I should back to my laptop tomorrow, but iirc, my paths always started with C:\\Users\\something\\else, so perhaps the issue is with the double backslash right after the drive letter?

I can do some testing tomorrow, I just wanted to create this issue before i forgot again

Oh, yeah. I will fix this later.

Jack251970 avatar Feb 23 '25 03:02 Jack251970

After looking into the codes, I think this is the normal behaviour. C:\\ is the path not allowed.

https://github.com/Flow-Launcher/Flow.Launcher/blob/2bc9203be6469d72ab7c84a3d04491d82e08689f/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs#L247-L254

Jack251970 avatar Feb 23 '25 08:02 Jack251970

After looking into the codes, I think this is the normal behaviour. C:\\ is the path not allowed.

Flow.Launcher/Flow.Launcher.Plugin/SharedCommands/FilesFolders.cs

Lines 247 to 254 in 2bc9203 if (char.IsLetter(querySearchString[0]) && querySearchString[1] == ':' && querySearchString[2] == '\') { return querySearchString.Length == 3 || querySearchString[3] != '\'; }

return false;

That's interesting...

@taooceros seems like you're the one who added that. Is there a specific reason that you chose to disallow it?

cibere avatar Feb 24 '25 00:02 cibere

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 60 days.\n\nAlternatively this issue can be kept open by adding one of the following labels:\nkeep-fresh

github-actions[bot] avatar Apr 25 '25 02:04 github-actions[bot]

IIRC this is copied from older code, I don't have a specific reason for that. We can remove it if that makes things better. However, I think the explorer plugin majorly use single \ which I guess is why?

taooceros avatar Apr 25 '25 21:04 taooceros