Apply requested changes

This commit is contained in:
Nuntius 2021-08-29 17:47:01 +02:00
parent a0ab740234
commit a5c66e7c5d
2 changed files with 5 additions and 9 deletions

View file

@ -512,7 +512,7 @@ static BOOL isEasyHandleAddedToMultiHandle(GSNativeProtocolInternalState state)
session = [task session];
NSAssert(nil != session, @"Missing session");
delegate = [[task session] delegate];
delegate = [session delegate];
if (nil != delegate
&& [task isKindOfClass: [NSURLSessionDataTask class]]
&& [delegate respondsToSelector: @selector(URLSession:dataTask:didReceiveData:)])

View file

@ -293,10 +293,6 @@
tempURL = [NSURL fileURLWithPath: NSTemporaryDirectory()];
_fileURL = [NSURL fileURLWithPath: fileName relativeToURL: tempURL];
RELEASE(randomUUID);
RELEASE(fileName);
RELEASE(tempURL);
}
return _fileURL;
@ -312,12 +308,12 @@
/* Create temporary file and open a fileHandle for writing. */
if (!_fileHandle)
{
NSFileManager *file = [NSFileManager defaultManager];
[file createFileAtPath: [[self fileURL] relativePath] contents: nil attributes: nil];
NSFileManager *fileManager = [NSFileManager defaultManager];
[fileManager createFileAtPath: [[self fileURL] relativePath]
contents: nil
attributes: nil];
_fileHandle = [NSFileHandle fileHandleForWritingToURL: [self fileURL] error: NULL];
RELEASE(file);
}
return _fileHandle;