Marino Faggiana преди 7 години
родител
ревизия
ae624c016d
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3 2
      iOSClient/Networking/NCNetworkingSync.m

+ 3 - 2
iOSClient/Networking/NCNetworkingSync.m

@@ -164,14 +164,15 @@
     
     [communication readFile:folderPathName onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSArray *items, NSString *redirectedServer) {
         
-        NSDictionary *fields = [response allHeaderFields];
-        returnFileID = [CCUtility removeForbiddenCharactersFileSystem:[fields objectForKey:@"OC-FileId"]];
         dispatch_semaphore_signal(semaphore);
         
     } failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
         
         [communication createFolder:folderPathName onCommunication:communication withForbiddenCharactersSupported:YES successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
             
+            NSDictionary *fields = [response allHeaderFields];
+            returnFileID = [CCUtility removeForbiddenCharactersFileSystem:[fields objectForKey:@"OC-FileId"]];
+            
             [[NCManageDatabase sharedInstance] clearDateReadWithServerUrl:[CCUtility deletingLastPathComponentFromServerUrl:folderPathName] directoryID:nil];
             dispatch_semaphore_signal(semaphore);