jed-users mailing list

[2005 Date Index] [2005 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: Read only files.


On 1 sept. 05, at 16:55, John E. Davis wrote:

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:

This appears to work perfectly, thank you, and thanks for the great work on jed!


--M


[2005 date index] [2005 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]