瀏覽代碼

fix code

Signed-off-by: marinofaggiana <ios@nextcloud.com>
marinofaggiana 3 年之前
父節點
當前提交
c32ffbb3c6
共有 1 個文件被更改,包括 4 次插入4 次删除
  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);
     }