mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Fix return of flag in fileExistsAtPath:isDirectory:
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@18990 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
cf2564d36e
commit
a05f0cb57f
2 changed files with 9 additions and 2 deletions
|
@ -10,6 +10,8 @@
|
|||
* Source/NSNotificationCenter.m: Rewrite posting so that we don't hold
|
||||
a lock on the center while actually posting ... should prevent
|
||||
possible deadlock in multithreaded programs.
|
||||
` * Source/NSFileManager.m: ([-fileExistsAtPath:isDirectory:]) set
|
||||
the flag to NO if the path does not exist. (Fixes bug #7532)
|
||||
|
||||
2004-03-30 Willem Rein Oudshoorn <Wim.Oudshoorn@agilisys.com>
|
||||
|
||||
|
|
|
@ -1188,13 +1188,18 @@ static NSFileManager* defaultManager = nil;
|
|||
|
||||
/**
|
||||
* Returns YES if a file (or directory etc) exists at the specified path.<br />
|
||||
* If the isDirectory argument is not a nul pointer, stores a flag in the
|
||||
* location it points to, to indicate whether the file is a directory or not.
|
||||
* If the isDirectory argument is not a nul pointer, stores a flag
|
||||
* in the location it points to, indicating whether the file is a
|
||||
* directory or not.<br />
|
||||
*/
|
||||
- (BOOL) fileExistsAtPath: (NSString*)path isDirectory: (BOOL*)isDirectory
|
||||
{
|
||||
const char* cpath = [self fileSystemRepresentationWithPath: path];
|
||||
|
||||
if (isDirectory != 0)
|
||||
{
|
||||
*isDirectory = NO;
|
||||
}
|
||||
if (cpath == 0 || *cpath == '\0')
|
||||
{
|
||||
return NO;
|
||||
|
|
Loading…
Reference in a new issue