Bug 206271 - okular creates(erases) empty file when "Save As..." to original file
Summary: okular creates(erases) empty file when "Save As..." to original file
Status: RESOLVED DUPLICATE of bug 207214
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.8.2
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-04 19:27 UTC by Cobra176
Modified: 2009-09-13 23:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cobra176 2009-09-04 19:27:37 UTC
Version:           0.8.2 (using 4.2.2 (KDE 4.2.2), Kubuntu packages)
Compiler:          cc
OS:                Linux (x86_64) release 2.6.28-13-generic

okular creates(erases) empty file when "Save As..." to original file

Steps to reproduce:
1. Open a PDF file with Okular.
2. Select File->Save As...
3. In the save dialog, select the same file which was loaded.
4. Viewer will go gray and message will show that document is being reloaded but document will not reload.
5. Check the file's properties with your favorite file manager. Size is now zero, the original PDF has been lost.

Expected behavior:
Okular should save the file to the opened file just as it would if Save As... was applied to any other file name. File should reload fine.

Purpose:
Sometimes it is nice to use a viewer to load and re-write PDF files to ensure that PDFs which may have buggy code are uniform and can be read on other viewers.
Comment 1 Albert Astals Cid 2009-09-13 23:23:37 UTC
Your idea of rewriting is not what Okular does on save as, it just copies byte per byte the file so it won't do what you want, but now at least i've fixed that you won't loose the file on saving over itself.

Thanks for caring about okular and reporting this bug.

*** This bug has been marked as a duplicate of bug 207214 ***