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:
rfm 2012-08-10 08:33:03 +00:00
parent d4ca2ec929
commit cd19623e53
6 changed files with 40 additions and 9 deletions

View file

@ -1,3 +1,13 @@
2012-08-10 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSColorList.m:
* Source/NSSavePanel.m:
* Source/NSFileWrapper.m:
* Source/NSDocumentController.m:
* Tools/GSspell.m:
Use new method for creating intermediate directories rater than
depending on incorrect behavior of the old method.
2012-08-07 Fred Kiefer <FredKiefer@gmx.de> 2012-08-07 Fred Kiefer <FredKiefer@gmx.de>
* TextConverters/RTF/RTFProducer.m (-_addAttributesString:): * TextConverters/RTF/RTFProducer.m (-_addAttributesString:):

View file

@ -486,7 +486,9 @@ static NSColorList *themeColorList = nil;
if (path_is_standard && ([fm fileExistsAtPath: path] == NO)) if (path_is_standard && ([fm fileExistsAtPath: path] == NO))
{ {
if ([fm createDirectoryAtPath: path if ([fm createDirectoryAtPath: path
attributes: nil]) withIntermediateDirectories: YES
attributes: nil
error: NULL])
{ {
NSLog (@"Created standard directory %@", path); NSLog (@"Created standard directory %@", path);
} }

View file

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

View file

@ -203,7 +203,10 @@
NSEnumerator *enumerator = [_wrapperData keyEnumerator]; NSEnumerator *enumerator = [_wrapperData keyEnumerator];
NSString *key; NSString *key;
[fm createDirectoryAtPath: path attributes: _fileAttributes]; [fm createDirectoryAtPath: path
withIntermediateDirectories: YES
attributes: _fileAttributes
error: NULL];
while ((key = (NSString*)[enumerator nextObject])) while ((key = (NSString*)[enumerator nextObject]))
{ {
NSString *newPath = NSString *newPath =

View file

@ -1336,7 +1336,10 @@ selectCellWithString: (NSString*)title
if (result == NSAlertDefaultReturn) if (result == NSAlertDefaultReturn)
{ {
if ([_fm createDirectoryAtPath: filename attributes: nil] == NO) if ([_fm createDirectoryAtPath: filename
withIntermediateDirectories: YES
attributes: nil
error: NULL] == NO)
{ {
NSRunAlertPanel(_(@"Save"), NSRunAlertPanel(_(@"Save"),
_(@"The directory '%@' could not be created."), _(@"The directory '%@' could not be created."),

View file

@ -137,7 +137,10 @@
} }
path = [path stringByAppendingPathComponent: @"Resources"]; path = [path stringByAppendingPathComponent: @"Resources"];
if (![fm createDirectoryAtPath: path attributes: nil]) if (![fm createDirectoryAtPath: path
withIntermediateDirectories: YES
attributes: nil
error: NULL])
{ {
NSLog(@"cannot not create bundle directory %@", path); NSLog(@"cannot not create bundle directory %@", path);
return NO; return NO;