mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +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
1d7edc23ec
commit
c8daec3ca5
1 changed files with 10 additions and 2 deletions
|
@ -770,8 +770,16 @@ static NSFileManager* defaultManager = nil;
|
|||
NSFileGroupOwnerAccountName
|
||||
};
|
||||
|
||||
if (stat(cpath, &statbuf) != 0)
|
||||
return nil;
|
||||
if (flag)
|
||||
{
|
||||
if (stat(cpath, &statbuf) != 0)
|
||||
return nil;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lstat(cpath, &statbuf) != 0)
|
||||
return nil;
|
||||
}
|
||||
|
||||
values[0] = [NSNumber numberWithUnsignedLongLong: statbuf.st_size];
|
||||
values[1] = [NSDate dateWithTimeIntervalSince1970: statbuf.st_mtime];
|
||||
|
|
Loading…
Reference in a new issue