Skip to content
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

Windows: allow forward slashes (/) instead of backslashes (\) in "Open file" dialog #3868

Open
cousteaulecommandant opened this issue May 10, 2024 · 2 comments
Labels

Comments

@cousteaulecommandant
Copy link
Contributor

On Windows, when I open a file, press Ctrl-L, and enter a relative path using forward slashes (/) instead of Windows's official backslash path separator (\), Geany doesn't understand that and produces a confusing error message.

Specifically, if I go to C:\Users\cousteau\ and enter AAA/BBB/ccc.txt, I get "Error: couldn't find C:\Users\cousteau\AAA\BBB\AAA\BBB\cc.txt. Note that the directory part (AAA/BBB/) appears twice, but other than that it looks like Geany is somewhat able to parse the path. If instead I enter AAA\BBB\ccc.txt, Geany will open C:\Users\cousteau\AAA\BBB\cc.txt without complaining.

This is a bit inconveniencing because I often work with Unix-like environments (Git bash shell, MinGW, MSYS, WSL, tools and languages that ignore Windows's odd decision to use backslashes and use the usual / instead, etc), so whenever I get a file name (e.g. after running find on bash) the path is specified using forward slashes. I'd love to be able to just copy-paste that in Geany and have it open without manually replacing every / with \.

@elextr
Copy link
Member

elextr commented May 10, 2024

Version of Geany, what version of GTK?

AFAICT you are operating totally within the GTK open file dialog, it does the munging of typed input with open directory and Geany can only read the results. So we can't control that behaviour.

@elextr elextr added the gtk label May 10, 2024
@cousteaulecommandant
Copy link
Contributor Author

Geany 2.0 | GTK+ v3.24.39 | GLib v2.78.0

I just tried with a different GTK program (gtkwave) and it doesn't support / either, so you're probably right. Pity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants