File names containing a colon - ":" - are treated as remote files when used as parameters in a shell, can be opened via a file dialog, but can't be exported to
Environment/Versions
- GIMP version: 2.10.32, 2.10.18, likely any 2.10.x
- Package: Debian Sid repository, presumably all others as well
- Operating System: Linux (colons need to be valid for use in file names in the file system)
Description of the bug
This was found by a user and documented in a Twitter thread, see: https://twitter.com/mies1234/status/1556554255531708417
Basically, if you have a file containing at least one color in its name, then this file is treated as being a remote file in GIMP's file handling code. Loading the same file via the File > Open dialog works just fine, but I found that exporting to such file names is not possible, either (the latter might be related to issue #1032 (closed), actually).
Reproduction
The examples in the tweet use the user#s file naming scheme which, for debugging proposes, has a debug:: prefix before file names, but it works (or doesn't, depending on how you want to phrase it) as well with a file named test:foo.png:
Is the bug reproducible? Always
Reproduction steps:
- $ cp foo.png test:foo.png
- $ gimp test:foo.png
Expected result: The image is opened in GIMP
Actual result: The error message file_open_image: mounting remote volume failed, trying to downloadthe file: Location is not mountable appears.
Additional information
The code location seems to be https://gitlab.gnome.org/GNOME/gimp/-/blob/gimp-2-10/app/file/file-open.c#L100 - we use g_file_is_native (file)
to check if the file is a native file.
Providing an absolute path in the shell works - that is, gimp /home/foo/test:foo.png loads the image in GIMP - so we probably need to test whether a file with a possibly remote-location-indicating name exists before we try to connect to it.