Bug 120674 - using "save as" with the same name destroys the file
Summary: using "save as" with the same name destroys the file
Status: RESOLVED FIXED
Alias: None
Product: kpdf
Classification: Unclassified
Component: general (show other bugs)
Version: 0.5
Platform: Ubuntu Packages Linux
: VHI major (vote)
Target Milestone: ---
Assignee: Albert Astals Cid
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-23 23:15 UTC by Georg Brunmayr
Modified: 2006-01-25 01:02 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 Georg Brunmayr 2006-01-23 23:15:35 UTC
Version:           0.5 (using KDE KDE 3.5.0)
Installed from:    Ubuntu Packages
OS:                Linux

A Friend of mine used my box to read a pdf via kpdf, then klicked "save as" with the same output file as the active one and this destroys the file. This isn't a common action but it shoud not happen, also if it makes no sense to do so.
Comment 1 Albert Astals Cid 2006-01-24 00:00:01 UTC
Sorry for destroying your data :-(
I have no time for fixing that right now, but will try as soon as possible (probably can find some time tomorrow).
Comment 2 Albert Astals Cid 2006-01-24 00:17:29 UTC
Well, lost 15 minutes of sleep and fixed it the easy way, you are not allowed to save a document over itself as anyway it has no sense to do that.

http://websvn.kde.org/branches/KDE/3.5/kdegraphics/kpdf/part.cpp?rev=501814&r1=499855&r2=501814
Comment 3 Kurt Pfeifle 2006-01-25 01:02:33 UTC
<i>"you are not allowed to save a document over itself as anyway it has no sense to do that."</i>

I agree. :) 

Do I really? Well, at least it is better to block this action instead of letting it lead to data loss.

But what if I want to use a future version of oKular or kpdf which add annotation support? It should be allowed to use "Save as..." then, no? (Even if standard "Save" would still be used in 99% of cases, and if the standard "Save" should probably warn the user "This PDF has been modified by you. You'll loose the original version if you use continue to save and stick to the same file name.")