Community
Participate
Working Groups
On Mac OS/X (and maybe other unices), a file with with write permissions, but with the immutable flag set is reported as Writable, although the file can not be changed. (On OS/X the perforce versioning control system uses this flag to allow/disallow a user to edit a file) I tested the following patch (source distribution of eclipse 3.0 build M2) of the file plugins/ org.eclipse.core.resources.macosx/src/core.c 99,100d98 < else if ((info.st_flags & (UF_IMMUTABLE | SF_IMMUTABLE)) != 0) < result |= STAT_READ_ONLY; 138,140c136 < else if ((info.st_flags & (UF_IMMUTABLE | SF_IMMUTABLE)) != 0) < result |= STAT_READ_ONLY; < --- >
Yes, if you "lock" a file in the Finder, this sets the IMMUTABLE bit and not the write permission bits. And if you set the immutable bit via cmd line: chflags uchg <filename> the file is locked in the Finder. So I will apply the patch to the MacOS X implementation of core.c. However, I'm not really sure what to do in CoreFileSystemLibrary.internalSetReadOnly &Co. platform-core please advise.
fixed for N20030807 - applied patch (for internalGetStat) - internalSetReadOnly sets/clears usr immutable flag - internalCopyAttributes copies usr immutable flag