mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
File manager fix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6617 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d9201252dc
commit
cf04801a9a
1 changed files with 10 additions and 4 deletions
|
@ -508,7 +508,7 @@ static NSFileManager* defaultManager = nil;
|
|||
{
|
||||
NSArray *contents;
|
||||
|
||||
if (handler)
|
||||
if (handler != nil)
|
||||
[handler fileManager: self willProcessPath: path];
|
||||
|
||||
contents = [self directoryContentsAtPath: path];
|
||||
|
@ -1047,11 +1047,17 @@ static NSFileManager* defaultManager = nil;
|
|||
{
|
||||
NSDirectoryEnumerator *direnum;
|
||||
NSMutableArray *content;
|
||||
BOOL isDir;
|
||||
IMP nxtImp;
|
||||
IMP addImp;
|
||||
|
||||
if (![self fileExistsAtPath: path isDirectory: &isDir] || !isDir)
|
||||
NSDictionary *attr;
|
||||
NSString *type;
|
||||
|
||||
/*
|
||||
* See if this is a directory (don't follow links).
|
||||
*/
|
||||
attr = [self fileAttributesAtPath: path traverseLink: NO];
|
||||
type = [attr objectForKey: NSFileType];
|
||||
if ([type isEqualToString: NSFileTypeDirectory] == NO)
|
||||
return nil;
|
||||
|
||||
direnum = [[NSDirectoryEnumerator alloc] initWithDirectoryPath: path
|
||||
|
|
Loading…
Reference in a new issue