mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-24 22:22:21 +00:00
Use cvs export to make snapshots/dists. Minor patches.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2742 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1a9e7bade4
commit
5ad4c23b77
40 changed files with 5025 additions and 632 deletions
|
@ -38,6 +38,7 @@
|
|||
#include <errno.h>
|
||||
|
||||
#include <Foundation/NSUserDefaults.h>
|
||||
#include <Foundation/NSFileManager.h>
|
||||
#include <Foundation/NSPathUtilities.h>
|
||||
#include <Foundation/NSDictionary.h>
|
||||
#include <Foundation/NSArray.h>
|
||||
|
@ -505,11 +506,20 @@ static NSMutableString *processName = nil;
|
|||
return NO;
|
||||
|
||||
// Read the persistent data from the stored database
|
||||
newDict = [[NSMutableDictionary allocWithZone:[self zone]]
|
||||
initWithContentsOfFile:defaultsDatabase];
|
||||
if (!newDict)
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath: defaultsDatabase])
|
||||
newDict = [[NSMutableDictionary allocWithZone:[self zone]]
|
||||
initWithCapacity:1];
|
||||
initWithContentsOfFile:defaultsDatabase];
|
||||
else
|
||||
{
|
||||
NSLog(@"Creating defaults database file %@", defaultsDatabase);
|
||||
[[NSFileManager defaultManager] createFileAtPath: defaultsDatabase
|
||||
contents: nil
|
||||
attributes: nil];
|
||||
}
|
||||
|
||||
if (!newDict)
|
||||
newDict = [[NSMutableDictionary allocWithZone:[self zone]]
|
||||
initWithCapacity:1];
|
||||
|
||||
if (changedDomains)
|
||||
{ // Synchronize both dictionaries
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue