mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-03 13:21:00 +00:00
Fix fileAttributesAtPath:traverseLink: for links
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4427 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f9cf334d4e
commit
a1b41089df
1 changed files with 10 additions and 2 deletions
|
@ -770,8 +770,16 @@ static NSFileManager* defaultManager = nil;
|
||||||
NSFileGroupOwnerAccountName
|
NSFileGroupOwnerAccountName
|
||||||
};
|
};
|
||||||
|
|
||||||
if (stat(cpath, &statbuf) != 0)
|
if (flag)
|
||||||
return nil;
|
{
|
||||||
|
if (stat(cpath, &statbuf) != 0)
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (lstat(cpath, &statbuf) != 0)
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
values[0] = [NSNumber numberWithUnsignedLongLong: statbuf.st_size];
|
values[0] = [NSNumber numberWithUnsignedLongLong: statbuf.st_size];
|
||||||
values[1] = [NSDate dateWithTimeIntervalSince1970: statbuf.st_mtime];
|
values[1] = [NSDate dateWithTimeIntervalSince1970: statbuf.st_mtime];
|
||||||
|
|
Loading…
Reference in a new issue