be ready for coming osx compatibility fix in base

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35389 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2012-08-10 08:33:03 +00:00
parent ebe55654b2
commit 58fa0b0126
6 changed files with 40 additions and 9 deletions

View file

@ -1501,14 +1501,24 @@ static NSString *processName = nil;
if ([fm fileExistsAtPath: path isDirectory: &isDir] == NO)
{
if (![fm createDirectoryAtPath: path attributes: nil])
return nil;
if (![fm createDirectoryAtPath: path
withIntermediateDirectories: YES
attributes: nil
error: NULL])
{
return nil;
}
}
else if (isDir == NO)
{
if (![fm removeFileAtPath: path handler: nil] ||
![fm createDirectoryAtPath: path attributes: nil])
return nil;
if (![fm removeFileAtPath: path handler: nil]
|| ![fm createDirectoryAtPath: path
withIntermediateDirectories: YES
attributes: nil
error: NULL])
{
return nil;
}
}
}