Tidied indentation.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3662 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 1999-02-05 11:44:38 +00:00
parent 3d9f74723d
commit 3f9a08c193
2 changed files with 51 additions and 36 deletions

View file

@ -72,27 +72,27 @@
if ([fileManager fileExistsAtPath: lockDir isDirectory: &isDirectory] == NO)
{
NSLog(@"part of the path to the lock file '%@' is missing\n", lockPath);
[self dealloc];
[self release];
return nil;
}
if (isDirectory == NO)
{
NSLog(@"part of the path to the lock file '%@' is not a directory\n",
lockPath);
[self dealloc];
[self release];
return nil;
}
if ([fileManager isWritableFileAtPath: lockDir] == NO)
{
NSLog(@"parent directory of lock file '%@' is not writable\n", lockPath);
[self dealloc];
[self release];
return nil;
}
if ([fileManager isExecutableFileAtPath: lockDir] == NO)
{
NSLog(@"parent directory of lock file '%@' is not accessible\n",
lockPath);
[self dealloc];
[self release];
return nil;
}
return self;

View file

@ -627,7 +627,7 @@ static NSMutableString *processName = nil;
if (tickingTimer == nil)
{
[NSTimer scheduledTimerWithTimeInterval:30
tickingTimer = [NSTimer scheduledTimerWithTimeInterval: 30
target: self
selector: @selector(__timerTicked:)
userInfo: nil
@ -636,21 +636,29 @@ static NSMutableString *processName = nil;
// Get file lock - break any lock that is more than five minute old.
if ([defaultsDatabaseLock tryLock] == NO)
{
if ([[defaultsDatabaseLock lockDate] timeIntervalSinceNow] < -300.0)
{
[defaultsDatabaseLock breakLock];
if ([defaultsDatabaseLock tryLock] == NO)
{
return NO;
}
}
else
{
return NO;
}
}
DESTROY(dictionaryRep);
// Read the persistent data from the stored database
if ([[NSFileManager defaultManager] fileExistsAtPath: defaultsDatabase])
{
newDict = [[NSMutableDictionary allocWithZone: [self zone]]
initWithContentsOfFile: defaultsDatabase];
}
else
{
NSLog(@"Creating defaults database file %@", defaultsDatabase);
@ -660,8 +668,10 @@ static NSMutableString *processName = nil;
}
if (!newDict)
{
newDict = [[NSMutableDictionary allocWithZone: [self zone]]
initWithCapacity: 1];
}
if (changedDomains)
{ // Synchronize both dictionaries
@ -671,11 +681,15 @@ static NSMutableString *processName = nil;
while ((obj = [enumerator nextObject]))
{
dict = [persDomains objectForKey: obj];
if (dict) // Domane was added or changet
if (dict) // Domain was added or changet
{
[newDict setObject: dict forKey: obj];
}
else // Domain was removed
{
[newDict removeObjectForKey: obj];
}
}
[persDomains release];
persDomains = newDict;
// Save the changes
@ -698,9 +712,10 @@ static NSMutableString *processName = nil;
object: nil];
}
else
{
[newDict release];
}
}
return YES;
}