mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-20 20:26:42 +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
54d8f446f6
commit
e7f67b006b
1 changed files with 10 additions and 4 deletions
|
@ -508,7 +508,7 @@ static NSFileManager* defaultManager = nil;
|
||||||
{
|
{
|
||||||
NSArray *contents;
|
NSArray *contents;
|
||||||
|
|
||||||
if (handler)
|
if (handler != nil)
|
||||||
[handler fileManager: self willProcessPath: path];
|
[handler fileManager: self willProcessPath: path];
|
||||||
|
|
||||||
contents = [self directoryContentsAtPath: path];
|
contents = [self directoryContentsAtPath: path];
|
||||||
|
@ -1047,11 +1047,17 @@ static NSFileManager* defaultManager = nil;
|
||||||
{
|
{
|
||||||
NSDirectoryEnumerator *direnum;
|
NSDirectoryEnumerator *direnum;
|
||||||
NSMutableArray *content;
|
NSMutableArray *content;
|
||||||
BOOL isDir;
|
|
||||||
IMP nxtImp;
|
IMP nxtImp;
|
||||||
IMP addImp;
|
IMP addImp;
|
||||||
|
NSDictionary *attr;
|
||||||
if (![self fileExistsAtPath: path isDirectory: &isDir] || !isDir)
|
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;
|
return nil;
|
||||||
|
|
||||||
direnum = [[NSDirectoryEnumerator alloc] initWithDirectoryPath: path
|
direnum = [[NSDirectoryEnumerator alloc] initWithDirectoryPath: path
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue