treesheets icon indicating copy to clipboard operation
treesheets copied to clipboard

Linux file permissions are neglected

Open ucyo opened this issue 11 years ago • 3 comments

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.

ucyo avatar Nov 21 '14 15:11 ucyo

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.

aardappel avatar Nov 21 '14 15:11 aardappel

wanna have an ugly solution? :) just copy the *.bak file back and overwrite the newly created *.cts

ucyo avatar Nov 21 '14 16:11 ucyo

Actually, the better solution would be to simply prompt for a different filename upon save.

aardappel avatar Nov 21 '14 16:11 aardappel