Skip to content
Commit ad1160be authored by rk flx's avatar rk flx Committed by Albert Astals Cid
Browse files

Fix saving annotations to gzipped files

Okular supports opening zipped files like document.pdf.gz by
transparently extracting them. However, since 559836c3 saving
annotations back was broken. This is because this commit tries to
prevent saving back changes to externally modified files to prevent data
loss. The way this is checked by comparing timestamps mistakenly
triggered for unchanged zipped files, too.

This can be solved by always comparing the before/after timestamps of
the actual file, instead of the timestamp of the temporary copy of the
extracted file. The change has to be done in two places so saving
repeatedly works too.

BUG: 338742

Test plan
    gzip autotests/data/file1.pdf && okular file1.pdf.gz
    Add annotation, saving works now instead of showing an error.
    touch normal.pdf still triggers modification warning.

Differential Revision: https://phabricator.kde.org/D9580
parent defe26ff
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment