Il giorno ven, 19/01/2007 alle 15.55 +0100, Mario Torre ha scritto: > I have done some tests and seems ok. What do you think (I need some help > to see if on other platforms it broke things)?
Too few, it seems.... + + return ((statbuf.st_mode & perms) == perms) ? 0 : 1; +} Indeed, this test do the job only in the common cases. Fix this is not hard, but I was wondering if we can use the "access" instead of "stat" and go with it. This could also be used in the other tests, and I think is way faster that opening a file for read/write and check if it fails... The only drawback of access I can think of is that it does the checks basing on the Real IDs, but I don't think a java program will be ever have the sticky bit, so I guess it is safe... Access is not reliable on NFS filesystems too, though, so this maybe a stopper. What do you think? Mario -- Lima Software, SO.PR.IND. s.r.l. http://www.limasoftware.net/ pgp key: http://subkeys.pgp.net/ Please, support open standards: http://opendocumentfellowship.org/petition/ http://www.nosoftwarepatents.com/
signature.asc
Description: Questa รจ una parte del messaggio firmata digitalmente
