Follow up for rev. [67ebc6f]

This commit is contained in:
Dmytro Tretiakov committed 2013-08-06 18:29:54 +03:00
1 parent abf70ab8dc
commit ab389260be
2 files changed
+5 -6

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@
#import <Foundation/Foundation.h>
#define DEBUG_LOGGING_ENABLED defined(DEBUG) && 0
#define DEBUG_LOGGING_ENABLED defined(DEBUG) && 1
@class SUDSDownloader;
+4 -5
View File
@@ -77,11 +77,10 @@ static NSString * const kSUFetchFolderName = @"fetch.XXXXXXXX";
NSString *tempFileTemplate = [[tempFolder URLByAppendingPathComponent:kSUFetchFolderName] path];
NSString *tempFilePath = [tempFileTemplate stringByAppendingPathComponent:[_destination lastPathComponent]];
if ([[NSFileManager defaultManager] fileExistsAtPath:tempFilePath])
{
[[NSFileManager defaultManager] removeItemAtPath:tempFilePath error:nil];
[[NSFileManager defaultManager] createDirectoryAtPath:tempFilePath withIntermediateDirectories:YES attributes:nil error:nil];
}
NSFileManager *fileManager = [NSFileManager defaultManager];
if ([fileManager fileExistsAtPath:tempFilePath])
[fileManager removeItemAtPath:tempFilePath error:nil];
_connectionDestination = [tempFilePath copy];
NSData *requestData = [NSKeyedArchiver archivedDataWithRootObject:urlRequest];