Misha Gorodnitzky <misaka@xxxxxxxxx> wrote:
Not as root I don't. Only when the file is truly un-writable, such as
when I edit a 0444 file as a non-privileged user, jed does as you
say. I'm using 0.99.16, by the way, I don't have 0.99.17 anywhere to
try out.
To determine if a file is to be regarded as read-only, the `access`
system call is used. Unfortunately, this system call appears to
indicate that root has write permission to a file even if it has not
permission bits set.
The next release will contain a patch using the stat system to obtain
the permission bits, and explicitly test those.
In the meantime, you can use the global_mode_hook to perform this
test: