After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 791635 - Can't open a single file if the name contains a colon after first word (interpreted as protocol of URL)
Can't open a single file if the name contains a colon after first word (inter...
Status: RESOLVED DUPLICATE of bug 676626
Product: eog
Classification: Core
Component: image viewer
3.26.x
Other Linux
: Normal minor
: ---
Assigned To: EOG Maintainers
EOG Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-12-14 23:11 UTC by Martin Møller Skarbiniks Pedersen
Modified: 2017-12-17 12:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Rename to clifford.png and it will open. (915 bytes, image/png)
2017-12-14 23:11 UTC, Martin Møller Skarbiniks Pedersen
Details

Description Martin Møller Skarbiniks Pedersen 2017-12-14 23:11:58 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.
Comment 1 André Klapper 2017-12-15 08:35:55 UTC
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
Comment 2 Martin Møller Skarbiniks Pedersen 2017-12-15 16:47:10 UTC
(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
Comment 3 Martin Møller Skarbiniks Pedersen 2017-12-15 18:10:40 UTC
Found the same reported to redhat. However their solution is only for paying customers.
https://access.redhat.com/solutions/2953301
Comment 4 Felix Riemann 2017-12-17 12:09:49 UTC
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 ***