Add some debug code

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25970 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2008-01-17 20:28:12 +00:00
parent 9b92aadc82
commit 33814fe97f

View file

@ -1757,17 +1757,23 @@ static NSStringEncoding defaultEncoding;
if (_STAT(lpath, &statbuf) != 0) if (_STAT(lpath, &statbuf) != 0)
{ {
NSDebugMLLog(@"NSFileManager", @"stat failed for '%s' ... %@",
lpath, [NSError _last]);
return nil; return nil;
} }
#ifdef HAVE_STATVFS #ifdef HAVE_STATVFS
if (statvfs(lpath, &statfsbuf) != 0) if (statvfs(lpath, &statfsbuf) != 0)
{ {
NSDebugMLLog(@"NSFileManager", @"statvfs failed for '%s' ... %@",
lpath, [NSError _last]);
return nil; return nil;
} }
blocksize = statfsbuf.f_frsize; blocksize = statfsbuf.f_frsize;
#else #else
if (statfs(lpath, &statfsbuf) != 0) if (statfs(lpath, &statfsbuf) != 0)
{ {
NSDebugMLLog(@"NSFileManager", @"statfs failed for '%s' ... %@",
lpath, [NSError _last]);
return nil; return nil;
} }
blocksize = statfsbuf.f_bsize; blocksize = statfsbuf.f_bsize;
@ -1786,6 +1792,7 @@ static NSStringEncoding defaultEncoding;
return [NSDictionary dictionaryWithObjects: values forKeys: keys count: 5]; return [NSDictionary dictionaryWithObjects: values forKeys: keys count: 5];
#else #else
NSDebugMLLog(@"NSFileManager", @"no support for filesystem attributes");
return nil; return nil;
#endif #endif
#endif /* MINGW */ #endif /* MINGW */