This commit is contained in:
Richard Frith-Macdonald 2018-01-02 12:48:18 +00:00
parent c0eb4e1f65
commit 6150b3fd62
3 changed files with 76 additions and 21 deletions

View file

@ -361,7 +361,8 @@ static NSStringEncoding defaultEncoding;
return _delegate;
}
- (void) setDelegate: (id<NSFileManagerDelegate>)delegate {
- (void) setDelegate: (id<NSFileManagerDelegate>)delegate
{
_delegate = delegate;
}
@ -2841,13 +2842,15 @@ static inline void gsedRelease(GSEnumeratedDirectory X)
int wbytes;
char buffer[bufsize];
/* Assumes source is a file and exists! */
NSAssert1 ([self fileExistsAtPath: source],
@"source file '%@' does not exist!", source);
attributes = [self fileAttributesAtPath: source traverseLink: NO];
NSAssert1 (attributes, @"could not get the attributes for file '%@'",
source);
if (nil == attributes)
{
return [self _proceedAccordingToHandler: handler
forError: @"source file does not exist"
inPath: source
fromPath: source
toPath: destination];
}
fileSize = [attributes fileSize];
fileMode = [attributes filePosixPermissions];