Startup fixes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@11267 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fedor 2001-10-28 16:53:21 +00:00
parent dba0c551c7
commit 4e67fdd554
3 changed files with 15 additions and 1 deletions

View file

@ -435,6 +435,7 @@ static NSString *pathForUser(NSString *user)
NSFileManager *mgr = [NSFileManager defaultManager];
NSString *home;
NSString *path;
NSString *libpath;
BOOL isDir;
home = NSHomeDirectoryForUser(user);
@ -461,6 +462,10 @@ static NSString *pathForUser(NSString *user)
NSLog(@"ERROR - '%@' is not a directory!", path);
return nil;
}
/* Create this path also. The GUI/font cache depends on it being there */
libpath = [path stringByAppendingPathComponent: @"Library"];
if ([mgr fileExistsAtPath: libpath isDirectory: &isDir] == NO)
[mgr createDirectoryAtPath: libpath attributes: nil];
path = [path stringByAppendingPathComponent: GNU_UserDefaultsDatabase];
return path;
}