marinofaggiana hace 4 años
padre
commit
e46ab6ad61
Se han modificado 1 ficheros con 1 adiciones y 4 borrados
  1. 1 4
      iOSClient/Utility/CCUtility.m

+ 1 - 4
iOSClient/Utility/CCUtility.m

@@ -1443,10 +1443,7 @@
             if (directory.e2eEncrypted == true) {
                 return true;
             }
-            NSURL *url = [NSURL URLWithString:serverUrl];
-            serverUrl = [url URLByDeletingLastPathComponent].absoluteString;
-            serverUrl = [serverUrl substringToIndex:[serverUrl length]-1];
-            if (serverUrl == nil) { return false; }
+            serverUrl = [CCUtility deletingLastPathComponentFromServerUrl:serverUrl];
             directory = [[NCManageDatabase sharedInstance] getTableDirectoryWithPredicate:[NSPredicate predicateWithFormat:@"account == %@ AND serverUrl == %@", account, serverUrl]];
         }