GNOME Bugzilla – Bug 133324
Save fails if backup file is write-protected
Last modified: 2006-10-12 20:09:07 UTC
To reproduce: Create a new diagram. Save it. Close Dia. Open the newly created diagram. Make a change and save. Mark the .dia~ file as read-only. Make another change and save. Error message comes up.
To me - at least from your description - there seems to be no reason to classify this as a bug. Or do you expect Dia to silently ignore the read only flag ? But it reminds that there was similar behaviour when one wants to edit a read-only file. First save simply worked, cause renaming read-only appers to be allowed (at least on win32). Second save does not work anymore cause of the reason described above. Probably the first attempt should have failed with a descriptive error message (or even better offer to check-out from source control ;-) [After looking at the source I seriously doubt this is a win32 only problem]
I'm still not considering thia a bug. Do you?
This is fixed with todays check that we can actually write to the file and directory. One could argue that in a read-only directory where you try to write on top of a read/write file, you should be allowed to do that. However, that would require either writing on top of the file, which is bad in case of error, or writing the diagram to a tmp dir and then re-rewriting it on top of the file. Neither is very nice, nor is it a really important scenario.