Ver Fonte

clear code

Marino Faggiana há 7 anos atrás
pai
commit
719a47d57b
1 ficheiros alterados com 10 adições e 21 exclusões
  1. 10 21
      iOSClient/Networking/CCNetworking.m

+ 10 - 21
iOSClient/Networking/CCNetworking.m

@@ -439,17 +439,12 @@
                 [self downloadFileSuccessFailure:fileName fileID:metadata.fileID etag:etag date:date serverUrl:serverUrl selector:metadata.sessionSelector selectorPost:metadata.sessionSelectorPost errorCode:errorCode];
         } else {
             
-            if (errorCode != kCFURLErrorCancelled) {
-                
-                NSLog(@"[LOG] Serius error internal download : metadata not found %@ ", url);
+            NSLog(@"[LOG] Remove record ? : metadata not found %@", url);
 
-                [[NCManageDatabase sharedInstance] addActivityClient:fileName fileID:@"" action:k_activityDebugActionUpload selector:@"" note:[NSString stringWithFormat:@"Serius error internal download : metadata not found %@", url] type:k_activityTypeFailure verbose:k_activityVerboseDefault activeUrl:_activeUrl];
-                
-                dispatch_async(dispatch_get_main_queue(), ^{
-                    if ([self.delegate respondsToSelector:@selector(downloadFileFailure:serverUrl:selector:message:errorCode:)])
-                        [self.delegate downloadFileFailure:@"" serverUrl:serverUrl selector:@"" message:@"" errorCode:k_CCErrorInternalError];
-                });
-            }
+            dispatch_async(dispatch_get_main_queue(), ^{
+                if ([self.delegate respondsToSelector:@selector(downloadFileFailure:serverUrl:selector:message:errorCode:)])
+                    [self.delegate downloadFileFailure:@"" serverUrl:serverUrl selector:@"" message:@"" errorCode:k_CCErrorInternalError];
+            });
         }
     }
     
@@ -488,18 +483,12 @@
             
         } else {
             
-            if (errorCode != kCFURLErrorCancelled) {
-            
-                NSLog(@"[LOG] Serius error internal upload : metadata not found %@", url);
-
-                [[NCManageDatabase sharedInstance] addActivityClient:fileName fileID:@"" action:k_activityDebugActionUpload selector:@"" note:[NSString stringWithFormat:@"Serius error internal upload : metadata not found %@", url] type:k_activityTypeFailure verbose:k_activityVerboseDefault activeUrl:_activeUrl];
-            
-                dispatch_async(dispatch_get_main_queue(), ^{
-                    if ([self.delegate respondsToSelector:@selector(uploadFileFailure:fileID:serverUrl:selector:message:errorCode:)])
-                        [self.delegate uploadFileFailure:nil fileID:@"" serverUrl:serverUrl selector:@"" message:@"" errorCode:k_CCErrorInternalError];
-                });
+            NSLog(@"[LOG] Remove record ? : metadata not found %@", url);
 
-            }
+            dispatch_async(dispatch_get_main_queue(), ^{
+                if ([self.delegate respondsToSelector:@selector(uploadFileFailure:fileID:serverUrl:selector:message:errorCode:)])
+                    [self.delegate uploadFileFailure:nil fileID:@"" serverUrl:serverUrl selector:@"" message:@"" errorCode:k_CCErrorInternalError];
+            });
         }
     }
 }