mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
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:
parent
dba0c551c7
commit
4e67fdd554
3 changed files with 15 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue