Browse Source

fix code

Signed-off-by: marinofaggiana <ios@nextcloud.com>
marinofaggiana 2 years ago
parent
commit
c32ffbb3c6
1 changed files with 4 additions and 4 deletions
  1. 4 4
      iOSClient/Utility/CCUtility.m

+ 4 - 4
iOSClient/Utility/CCUtility.m

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