pwmt / zathura

Document viewer
https://pwmt.org/projects/zathura
zlib License
1.88k stars 129 forks source link

GIO error for filenames with a colon #369

Closed sebastinas closed 2 months ago

sebastinas commented 1 year ago

On GitLab by @epicalyx on Jan 3, 2023, 19:54


It appears that zathura is unable to open filenames containing a colon. To replicate the problem, download a pdf file, check that zathura can open it, then rename it to a string containing ":", and check that zathura will not open the renamed file.

At least one other pdf viewer (Evince) appears to have the same problem. The problem seems to come from the syntax for locations in the GIO tool, which uses a colon.

sebastinas commented 1 year ago

On GitLab by @valoq on Jan 3, 2023, 22:26


This is reproducible for me as well with both zathura and evince when run on the command line.

However in both cases, the issue does not trigger when a file is opened in either application through a file manager.

Since several applications are affected, it is likely an issue in gio itself and I would recommend reporting it on their bugtracker: https://gitlab.gnome.org/GNOME/glib/

sebastinas commented 1 year ago

On GitLab by @vejkse on Mar 21, 2023, 14:57


See issue #171. A workaround is to use the full path of the file or to prefix the name of the file with ./ (file managers probably do one of those).

sebastinas commented 1 year ago

On GitLab by @vejkse on Mar 21, 2023, 15:14


I also found two variants of the issue on glib’s side: https://gitlab.gnome.org/GNOME/glib/-/issues/1623 and https://gitlab.gnome.org/GNOME/glib/-/issues/549. Based on what is said there, it’s clear that this won’t be changed on their side. If I understand it correctly (see man gio), it’s the responsibility of the applications/users to prefix the path with ./ or prefix the (full) path with file: (or use the full path).

Here’s the Evince issue: https://gitlab.gnome.org/GNOME/evince/-/issues/1817.

sebastinas commented 9 months ago

Duplicate of #171.