After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 133324 - Save fails if backup file is write-protected
Save fails if backup file is write-protected
Status: RESOLVED FIXED
Product: dia
Classification: Other
Component: general
CVS head
Other Linux
: Normal enhancement
: ---
Assigned To: Steffen Macke
Dia maintainers
Depends on:
Blocks:
 
 
Reported: 2004-02-03 16:28 UTC by Lars Clausen
Modified: 2006-10-12 20:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Lars Clausen 2004-02-03 16:28:23 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.
Comment 1 Hans Breuer 2004-02-06 22:35:02 UTC
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]
Comment 2 Hans Breuer 2005-12-27 19:31:54 UTC
I'm still not considering thia a bug. Do you?
Comment 3 Lars Clausen 2006-10-12 20:09:07 UTC
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.