mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Skip nil domains explicitely and do not use nil values to look them up
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39645 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
87ba1edf54
commit
b6557780b6
2 changed files with 18 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2016-05-08 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* Source/NSUserDefaults.m
|
||||
Skip nil domains explicitely and do not use nil values to look them up.
|
||||
|
||||
2016-04-04 Niels Grewe <niels.grewe@halbordnung.de>
|
||||
|
||||
* configure.ac: Check for runloop integration hooks in libdispatch
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/** Implementation for NSUserDefaults for GNUstep
|
||||
Copyright (C) 1995-2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-2016 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Georg Tuparev <Tuparev@EMBL-Heidelberg.de>
|
||||
EMBL & Academia Naturalis,
|
||||
|
@ -2403,7 +2403,12 @@ static BOOL isLocked = NO;
|
|||
= [[mgr directoryContentsAtPath: _defaultsDatabase] objectEnumerator];
|
||||
while (nil != (domainName = [enumerator nextObject]))
|
||||
{
|
||||
if (NO == [[domainName pathExtension] isEqual: @"plist"])
|
||||
NSString *domainExtension;
|
||||
|
||||
domainExtension = [domainName pathExtension];
|
||||
if (nil == domainExtension)
|
||||
continue;
|
||||
if (NO == [domainExtension isEqual: @"plist"])
|
||||
{
|
||||
/* We only treat files with a .plist extension as being
|
||||
* defaults domain files.
|
||||
|
@ -2411,6 +2416,12 @@ static BOOL isLocked = NO;
|
|||
continue;
|
||||
}
|
||||
domainName = [domainName stringByDeletingPathExtension];
|
||||
if (nil == domainName)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
NSLog(@"domain name: %@", domainName);
|
||||
|
||||
/* We only look at files which do not represent domains in the
|
||||
* _changedDomains list, since our internal information on the
|
||||
|
|
Loading…
Reference in a new issue