Don't check file ownership if file does not exist.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13627 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2002-05-11 05:21:46 +00:00
parent da4ab112a9
commit 8f36e0de83
3 changed files with 25 additions and 24 deletions

View file

@ -589,7 +589,8 @@ userDirectory(NSString *name, BOOL defaults)
}
#ifndef __MINGW__
/* FIXME ... need to get mingw working */
else if ([[attributes fileOwnerAccountName] isEqual: NSUserName()] == NO)
else if (attributes != nil
&& [[attributes fileOwnerAccountName] isEqual: NSUserName()] == NO)
{
fprintf(stderr, "The file '%s' is not owned by the current user."
"\nIgnoring it.\n", [file fileSystemRepresentation]);