Create directories only if it doesn't exist.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35548 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
stoyan 2012-09-09 21:29:38 +00:00
parent 546d35a421
commit 064c5554f2
2 changed files with 10 additions and 5 deletions

View file

@ -749,8 +749,12 @@ static NSStringEncoding defaultEncoding;
while ((path = (NSString *)[paths nextObject]) != nil)
{
dir = [dir stringByAppendingPathComponent: path];
result = [self createDirectoryAtPath: dir
attributes: attributes];
// create directory only if it doesn't exist
if (NO == [self fileExistsAtPath: dir])
{
result = [self createDirectoryAtPath: dir
attributes: attributes];
}
}
}
else