mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-21 04:32:03 +00:00
Apply patch by Sebastian Reitenbach <sebastia@l00-bugdead-prods.de>
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36272 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
825ae282a4
commit
75f5788037
4 changed files with 39 additions and 28 deletions
|
@ -58,6 +58,7 @@
|
|||
#import "Foundation/NSPathUtilities.h"
|
||||
#import "Foundation/NSProcessInfo.h"
|
||||
#import "Foundation/NSSet.h"
|
||||
#import "Foundation/NSURL.h"
|
||||
#import "Foundation/NSValue.h"
|
||||
#import "GSPrivate.h"
|
||||
#import "GNUstepBase/NSObject+GNUstepBase.h"
|
||||
|
@ -716,10 +717,6 @@ static NSStringEncoding defaultEncoding;
|
|||
{
|
||||
*error = [self _errorFrom: path to: nil];
|
||||
}
|
||||
else
|
||||
{
|
||||
*error = nil;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -780,15 +777,30 @@ static NSStringEncoding defaultEncoding;
|
|||
{
|
||||
*error = [self _errorFrom: path to: nil];
|
||||
}
|
||||
else
|
||||
{
|
||||
*error = nil;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new directory and all intermediate directories in the file URL
|
||||
* if flag is YES.
|
||||
* Creates only the last directory in the URL if flag is NO.<br />
|
||||
* The directory is created with the attributes
|
||||
* specified in attributes and any error is returned in error.<br />
|
||||
* returns YES on success, NO on failure.
|
||||
*/
|
||||
- (BOOL) createDirectoryAtURL: (NSURL *)url
|
||||
withIntermediateDirectories: (BOOL)flag
|
||||
attributes: (NSDictionary *)attributes
|
||||
error: (NSError **) error
|
||||
{
|
||||
return [self createDirectoryAtPath: [url path]
|
||||
withIntermediateDirectories: flag
|
||||
attributes: attributes
|
||||
error: error];
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new directory, and sets its attributes as specified.<br />
|
||||
* Fails if directories in the path are missing.<br />
|
||||
|
@ -1128,10 +1140,6 @@ static NSStringEncoding defaultEncoding;
|
|||
{
|
||||
*error = [self _errorFrom: src to: dst];
|
||||
}
|
||||
else
|
||||
{
|
||||
*error = nil;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -1239,10 +1247,6 @@ static NSStringEncoding defaultEncoding;
|
|||
{
|
||||
*error = [self _errorFrom: src to: dst];
|
||||
}
|
||||
else
|
||||
{
|
||||
*error = nil;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -1485,10 +1489,6 @@ static NSStringEncoding defaultEncoding;
|
|||
{
|
||||
*error = [self _errorFrom: path to: nil];
|
||||
}
|
||||
else
|
||||
{
|
||||
*error = nil;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -1906,10 +1906,6 @@ static NSStringEncoding defaultEncoding;
|
|||
{
|
||||
*error = [self _errorFrom: path to: nil];
|
||||
}
|
||||
else
|
||||
{
|
||||
*error = nil;
|
||||
}
|
||||
}
|
||||
|
||||
return d;
|
||||
|
@ -2983,7 +2979,7 @@ static inline void gsedRelease(GSEnumeratedDirectory X)
|
|||
@selector (fileManager:shouldProceedAfterError:)])
|
||||
{
|
||||
NSDictionary *errorInfo = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
path, @"Path",
|
||||
path, NSFilePathErrorKey,
|
||||
error, @"Error", nil];
|
||||
return [handler fileManager: self
|
||||
shouldProceedAfterError: errorInfo];
|
||||
|
@ -3001,7 +2997,7 @@ static inline void gsedRelease(GSEnumeratedDirectory X)
|
|||
@selector (fileManager:shouldProceedAfterError:)])
|
||||
{
|
||||
NSDictionary *errorInfo = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
path, @"Path",
|
||||
path, NSFilePathErrorKey,
|
||||
fromPath, @"FromPath",
|
||||
toPath, @"ToPath",
|
||||
error, @"Error", nil];
|
||||
|
@ -3044,7 +3040,7 @@ static inline void gsedRelease(GSEnumeratedDirectory X)
|
|||
else if (fromPath)
|
||||
{
|
||||
errorInfo = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
fromPath, @"Path",
|
||||
fromPath, NSFilePathErrorKey,
|
||||
message, NSLocalizedDescriptionKey,
|
||||
nil];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue