I want to disable files from being overwritten in Windows 10. I figured that was the use of the 'Read-only' file flag. But after enabling it, it appears programs (at least the program it opens in) can still overwrite it with absolutely no issue.
Isn't Windows supposed to prevent the file from being overwritten? Or is it per the application to respect this 'Read-only' flag?
(Specifically, this is .gm81 files being overwritten by GameMaker 8.1, although this shouldn't matter as I imagine the Read-only file flag should be program agnostic).
31 Answer
From experience the read-only flag prevents programs from directly overwriting files. A file can be opened with "write" permissions and the read-only flag should block that.
It does not prevent the file being deleted (by any program) and then a new file being created with the same name.
Depending on the program in question it is entirely possible that they simply read a file entirely into memory and then close it on loading, and simply delete and fully export everything from memory to a new file on saving. Programs should honour the honour the read-only flag, but they are not obligated to.
3