mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Standardise path for lock file.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26860 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d323255111
commit
ea8dba8a94
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2008-09-19 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSDistributedLock.m: Standardise the path we are given for
|
||||
the lock file.
|
||||
|
||||
2008-09-18 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSThread.m: try to make firing of thread performers
|
||||
|
|
|
@ -125,20 +125,20 @@ static NSFileManager *mgr = nil;
|
|||
NSString *lockDir;
|
||||
BOOL isDirectory;
|
||||
|
||||
_lockPath = [aPath copy];
|
||||
_lockPath = [[aPath stringByStandardizingPath] copy];
|
||||
_lockTime = nil;
|
||||
|
||||
lockDir = [_lockPath stringByDeletingLastPathComponent];
|
||||
if ([mgr fileExistsAtPath: lockDir isDirectory: &isDirectory] == NO)
|
||||
{
|
||||
NSLog(@"part of the path to the lock file '%@' is missing\n", _lockPath);
|
||||
NSLog(@"part of the path to the lock file '%@' is missing\n", aPath);
|
||||
RELEASE(self);
|
||||
return nil;
|
||||
}
|
||||
if (isDirectory == NO)
|
||||
{
|
||||
NSLog(@"part of the path to the lock file '%@' is not a directory\n",
|
||||
_lockPath);
|
||||
_lockPath);
|
||||
RELEASE(self);
|
||||
return nil;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue