GNOME Bugzilla – Bug 791635
Can't open a single file if the name contains a colon after first word (interpreted as protocol of URL)
Last modified: 2017-12-17 12:09:49 UTC
Created attachment 365563 [details] Rename to clifford.png and it will open. eog will not open a file from the CLI if it contain one or more semicolons in the filename and it is the only file. It looks like eog thinks it is a directory. $ cmp 'clifford:-1.4:1.6:1:0.7.png' clifford.png # same file $ file 'clifford:-1.4:1.6:1:0.7.png' clifford.png clifford:-1.4:1.6:1:0.7.png: PNG image data, 160 x 160, 8-bit colormap, non-interlaced clifford.png: PNG image data, 160 x 160, 8-bit colormap, non-interlaced clifford.png opens without a problem but if I try eog 'clifford:-1.4:1.6:1:0.7.png' the gui says: No images found in “clifford:///-1.4:1.6:1:0.7.png”. However eog opens both files without problems if both are given on the command line: eog clifford.png 'clifford:-1.4:1.6:1:0.7.png' and it works.
I don't see any semicolons in the file names provided above, just colons. "clifford:" seems to be interpreted as a protocol of an URL when at the beginning. Simple workaround: eog ./clifford\:-1.4\:1.6\:1\:0.7.png
(In reply to Martin Møller Skarbiniks Pedersen from comment #0) > Created attachment 365563 [details] > Rename to clifford.png and it will open. > > eog will not open a file from the CLI if it contain one or more semicolons > in the filename and it is the only file. > Sorry I meant colon
Found the same reported to redhat. However their solution is only for paying customers. https://access.redhat.com/solutions/2953301
Yes, this seems to be a known bug in g_file_new_for_commandline_arg() which misinterprets the filename as a URI. Prepending "./" to the files breaks this assumption. The case with both filenames works because the second filename will be deemed "broken", however the automatic directory indexing will pick the file with colons up again after opening the file without colons. Thanks for taking the time to report this. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of bug 676626 ***