mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Fail quietly when asked to read non-existent file
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40188 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ce18b5a8e5
commit
812cbbd80b
1 changed files with 5 additions and 0 deletions
|
@ -255,6 +255,11 @@ readContentsOfFile(NSString *path, void **buf, off_t *len, NSZone *zone)
|
|||
}
|
||||
|
||||
att = [mgr fileAttributesAtPath: path traverseLink: YES];
|
||||
if (nil == att)
|
||||
{
|
||||
return NO; // No such file ... fail quietly
|
||||
}
|
||||
|
||||
if ([att fileType] != NSFileTypeRegular)
|
||||
{
|
||||
NSWarnFLog(@"Open (%@) attempt failed - not a regular file", path);
|
||||
|
|
Loading…
Reference in a new issue