discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: - [NSFileManager isDeleteableFileAtPath:] bug in usage of access()


From: Richard Frith-Macdonald
Subject: Re: - [NSFileManager isDeleteableFileAtPath:] bug in usage of access()
Date: Thu, 6 Mar 2003 16:46:58 +0000


On Thursday, March 6, 2003, at 04:18  pm, Roland Schwingel wrote:

I thinks this access() call cannot work...

1) The parameter #2 for access() is defined to be a bitmask so it should be X_OK | W_OK 2) -isDeleteableFileAtPath: should return YES when the file is deleteable. access() returns 0 on success,
   so the logic is invers.

In my opinion the line with the access() call should read
     return  (access(cpath, X_OK | W_OK) == 0);

And that is the way I got it working here. With the current implementation the
method returns NO for perfectly deleteable files...


Thanks ... fixed in CVS for the 1.6.0 release.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]