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 693794 - Evince incorrectly reports document Location in its Properties if there are % in filename
Evince incorrectly reports document Location in its Properties if there are %...
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-02-14 13:49 UTC by Nrbrtx
Modified: 2013-02-17 11:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
File and Properties dialog for file with % in its name (278.26 KB, image/png)
2013-02-14 13:49 UTC, Nrbrtx
  Details
Unescape location URI in properties dialog (1.07 KB, patch)
2013-02-16 19:23 UTC, Germán Poo-Caamaño
committed Details | Review

Description Nrbrtx 2013-02-14 13:49:01 UTC
Created attachment 236057 [details]
File and Properties dialog for file with % in its name

I have a file named
art%3A10.1007%2FBF01034471.pdf,
if I open document Properties (Alt+Return) for it I get
Location: file:///home/norbert/Documents/PDFs/art%253A10.1007%252FBF01034471.pdf.

So there are extra escape sequences for percent sign (I know that %25 is a code for %). If I try to
ls -l /home/norbert/Documents/PDFs/art%253A10.1007%252FBF01034471.pdf I got ls: cannot access /home/filename/Documents/PDFs/art%253A10.1007%252FBF01034471.pdf: No such file or directory.
If I try to navigate to correct file /home/username/Documents/PDFs/art%3A10.1007%2FBF01034471.pdf I get no error.

So there is an error in % sign processing in evince.
See my screenshot to understand what I mean.

If I try to open a file, which path is in Location field of Properties window - file:///home/norbert/Documents/PDFs/art%253A10.1007%252FBF01034471.pdf, I get an error - "Unable to open document".

I tried to create a file with ~/%.pdf filename and get Location file:///home/norbert/%25.pdf for it in Properties window (evince reports not existed file).

This bug was discovered on Ubuntu 12.04 (https://bugs.launchpad.net/ubuntu/+source/evince/+bug/1112641).
Comment 1 Nrbrtx 2013-02-14 16:45:55 UTC
This bug exists in evince 3.6.1 (Fedora 18), evince 3.4.0 (OpenSuSe 12.2 and Ubuntu 12.04).
Comment 2 Nrbrtx 2013-02-16 17:31:26 UTC
This bug exists since Evince 2.32 (Gentoo ebuild evince-2.32.0-r4).
Comment 3 Germán Poo-Caamaño 2013-02-16 19:23:04 UTC
Created attachment 236401 [details] [review]
Unescape location URI in properties dialog

The URI is not used in any other place, so it could be unescaped to show it in the properties dialog.

I am not user if some characters should be declared illegal or not.
Comment 4 Nrbrtx 2013-02-16 20:04:15 UTC
Hello, Germán!
I patched src-package on Ubuntu 12.04 (Evince 3.4.0), your patch fixes this bug, thank you. 
Please apply patch to actual versions.
Comment 5 Carlos Garcia Campos 2013-02-17 10:40:35 UTC
Review of attachment 236401 [details] [review]:

Thanks!
Comment 6 Nrbrtx 2013-02-17 11:45:41 UTC
Thank you, Carlos!