Linux file permissions are neglected
Hi. If I have a *.cts file and change the file permissions to read-only, I can still edit the file. Afterwards just the temporary *.bak file is read-only, but the *.cts file is perfectly accessable.
Yeah, to avoid you ever being without a valid file in the case of a crash during save, it first moves the old file to .bak, then writes the new file. So what's up with Linux allowing read-only files to be moved? ;) I suppose I can block the user from all editing when I detect read-only.. that's not going to be exactly trivial though.
wanna have an ugly solution? :) just copy the *.bak file back and overwrite the newly created *.cts
Actually, the better solution would be to simply prompt for a different filename upon save.