Przeglądaj źródła

fix code

Signed-off-by: marinofaggiana <ios@nextcloud.com>
marinofaggiana 2 lat temu
rodzic
commit
c32ffbb3c6
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4 4
      iOSClient/Utility/CCUtility.m

+ 4 - 4
iOSClient/Utility/CCUtility.m

@@ -750,12 +750,12 @@
 #pragma --------------------------------------------------------------------------------------------
 
 + (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL
-{
-    assert([[NSFileManager defaultManager] fileExistsAtPath: [URL path]]);
-    
+{    
     NSError *error = nil;
     BOOL success = [URL setResourceValue:[NSNumber numberWithBool: YES] forKey: NSURLIsExcludedFromBackupKey error: &error];
-    if(!success){
+    if(success) {
+        NSLog(@"Excluding %@ from backup", [URL lastPathComponent]);
+    } else {
         NSLog(@"Error excluding %@ from backup %@", [URL lastPathComponent], error);
     }