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

Writing files read via jka-compr overwrites compressed file with uncompressed file #257

Open
piater opened this issue Feb 21, 2024 · 0 comments

Comments

@piater
Copy link

piater commented Feb 21, 2024

Steps to reproduce the behaviour

  1. Find any compressed PDF file, say, compr.pdf.gz.
  2. Alter it, e.g. by adding annotations.
  3. Save it with C-x C-s.

This results in compr.pdf.gz containing the altered PDF, not compressed despite the .gz extension.

Writing to a new file with a .gz extension using C-x -C-w likewise results in an uncompressed file.

What is the expected behaviour?
compr.pdf.gz is replaced by its altered PDF, transparently gzip-compressed by jka-compr.

Your pdf-tools install
Status: Installed in ‘pdf-tools-20230611.239/’ (unsigned).
Version: 20230611.239
Commit: c69e765

This is perhaps best fixed jointly with #258 by changing the file-saving logic of pdf-tools.

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