When I create a file with a newline character and open it with geany, it splits the file name with this character as delimiter and tries to open the files with these substrings. For example, create the l\nl file: ```bash touch $'l\nl' ``` Then open it with geany and see two open files with name l, each in one tab.
geany version: `1.34.1-1`
This is a recorded message, please always provide the version of Geany, Glib and GTK (see lines near the top of Help->Debug Messages) and the operating system and version you are using.
WFM, provide exactly the steps you use to open it.
provide exactly the steps you use to open it.
I simply open the file in the file browser. It also happens when opening it from a terminal. A space is not treated as a delimiter, so `geany $'l\nl' $'k k'` opens (or tries to open) the `k k` file and two `l` files.
Using command line and open dialog WFM. If you don't supply the information listed above we don't know whats different between your version and system and mine, so can't help you.
Is there any legitimate use case of using line breaks in filenames? Even if it works, it feels quite strange to me.
This is a recorded message, please always provide the version of Geany, Glib and GTK (see lines near the top of Help->Debug Messages) and the operating system and version you are using.
These redundant canned comments would no longer be needed if we go ahead with something like #2162, just sayin' …
WFM, provide exactly the steps you use to open it.
You need a running instance of Geany already, for the open to send files through the socket. Then it fails, as filenames are split by line.
Is there any legitimate use case of using line breaks in filenames? Even if it works, it feels quite strange to me.
Agreed. Well, I agree with the OP there's a bug, but I don't feel it's very important given that there are ways to open file file anyway (e.g. open dialog), and that it really seem like an odd corner case.
Anyhow, I guess we could fix this by e.g. urlencoding the filenames sent through the socket.
@b4n yeah, and I bet there are issues with those weird Unicode filenames too. There are far more important problems.
@HybridDog I happened to see you edited the OP to make it look like you included the information in the first place. The problem with that is github doesn't send any notifications for edits, so nobody noticed.
You need a running instance of Geany already, for the open to send files through the socket.
You're right, I didn't notice that it only works when Geany is already running.
I weren't completely sure if this issue has low priority because I don't know if there are valid use cases for such filenames or if this problem is a symptom of a higher priority problem.
Btw: It's possible to add quotes in the filename to change some messages: ![2019-07-05-114514_565x138_scrot](https://user-images.githubusercontent.com/3192173/60715436-4a3eac00-9f1d-11e...)
I weren't completely sure if this issue has low priority because I don't know if there are valid use cases for such filenames or if this problem is a symptom of a higher priority problem.
It is a slight problem in that it can be used to inject remote commands from a filename, but even so they are pretty much harmless.
Btw: Another low priority issue is the possibility to add quotes in the filename to change some messages: […]
This should be another issue, but actually I don't think it is an issue, and what can we do? There will always be a way of naming a file that results in a confusing message if that message contains the filename. We could perform some escaping, but thus we wouldn't show the *actual* filename. Maybe we could somehow make that italics or so so that it stands out better… not sure it's worth it if it's not super easy.
Btw: Another low priority issue is the possibility to add quotes in the filename to change some messages:
Simply putting a quote character before and after the filename in human read messages to make the filename stand out is a common idiom, but it would need to be consistently applied to all messages at once. Pull requests are welcome.
github-comments@lists.geany.org