Minor bugfix

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/freeze-1_6_0@16164 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2003-03-13 19:18:05 +00:00
parent 8832aad0a4
commit e4c2b96604
2 changed files with 11 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2003-03-13 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSFileManager.m: ([-isDeletableFileAtPath:]) Fix for the
case where the path is a file in the current directory.
2003-03-11 Adam Fedor <fedor@gnu.org>
* configure.ac: Fix some typos (Reported by

View file

@ -1243,8 +1243,12 @@ static NSFileManager* defaultManager = nil;
}
return (res & FILE_ATTRIBUTE_READONLY) ? NO : YES;
#else
cpath = [self fileSystemRepresentationWithPath:
[path stringByDeletingLastPathComponent]];
path = [path stringByDeletingLastPathComponent];
if ([path length] == 0)
{
path = @".";
}
cpath = [self fileSystemRepresentationWithPath: path];
return (access(cpath, X_OK | W_OK) == 0);
#endif