mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Fixed issues Fred pointed out
This commit is contained in:
parent
cb20153df4
commit
b4c24b8f8c
1 changed files with 13 additions and 9 deletions
|
@ -798,19 +798,23 @@ static NSStringEncoding defaultEncoding;
|
|||
{
|
||||
result = [NSURL URLWithString: [urlArray objectAtIndex: 0]];
|
||||
}
|
||||
else if(directory == NSItemReplacementDirectory)
|
||||
|
||||
if (directory == NSItemReplacementDirectory)
|
||||
{
|
||||
result = [NSURL URLWithString: NSTemporaryDirectory()];
|
||||
}
|
||||
|
||||
// If we should created it, create it...
|
||||
if (shouldCreate)
|
||||
{
|
||||
[self createDirectoryAtPath: [result absoluteString]
|
||||
withIntermediateDirectories: YES
|
||||
attributes: nil
|
||||
error: NULL];
|
||||
}
|
||||
if (![self fileExistsAtPath: [result absoluteString]])
|
||||
{
|
||||
// If we should created it, create it...
|
||||
if (shouldCreate)
|
||||
{
|
||||
[self createDirectoryAtPath: [result absoluteString]
|
||||
withIntermediateDirectories: YES
|
||||
attributes: nil
|
||||
error: error];
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue