Marino Faggiana 6 سال پیش
والد
کامیت
278a4c6e64
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLSessionManager.m

+ 2 - 0
iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLSessionManager.m

@@ -1180,7 +1180,9 @@ didFinishDownloadingToURL:(NSURL *)location
         if (fileURL) {
             delegate.downloadFileURL = fileURL;
             NSError *error = nil;
+            [[NSFileManager defaultManager] removeItemAtPath:fileURL.path error:nil];
             [[NSFileManager defaultManager] moveItemAtURL:location toURL:fileURL error:&error];
+            
             if (error) {
                 [[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDownloadTaskDidFailToMoveFileNotification object:downloadTask userInfo:error.userInfo];
             }