Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Atril should not use the filename extension to determine the file type #595

Open
vinc17fr opened this issue Nov 15, 2023 · 0 comments
Open

Comments

@vinc17fr
Copy link

Expected behaviour

Atril should determine the file type by looking at the file contents, not by using the filename extension, which is unreliable for files downloaded from the web.

Actual behaviour

Atril currently takes the file extension into account, as this can be seen by changing the filename (see below).

Steps to reproduce the behaviour

  1. Download https://www.vinc17.net/defi14.ps.gz (this is a gzipped PostScript file).
  2. Rename the file to defi14.ps-1.gz (note: with Firefox 119, if you download the file twice, you will get this filename, because defi14.ps.gz already exists due to the first download).
  3. Open this file (under the name defi14.ps-1.gz) with Atril, either from the command line (with the pathname in argument) or directly from Atril with the File → Open menu.

I get the following error:

Unable to open document
File type Gzip archive (application/gzip) is not supported

Note that there is no such issue with the filename defi14.ps.gz.

MATE general version

n/a (I am not using any desktop environment)

Package version

Atril 1.26.0 (atril 1.26.0-2+b1 Debian package)

Linux Distribution

Debian/unstable

Link to bugreport of your Distribution (requirement)

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1055971

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant