diff options
author | marinofaggiana <ios@nextcloud.com> | 2022-08-05 14:58:14 +0300 |
---|---|---|
committer | marinofaggiana <ios@nextcloud.com> | 2022-08-05 14:58:14 +0300 |
commit | c32ffbb3c6a315933302125f3afc2caf20a00ede (patch) | |
tree | 995bf1ef6b261d65e0fe45387195d79312487844 | |
parent | 56769e22068c14595483e77248ac7506e5c483f6 (diff) |
fix code
Signed-off-by: marinofaggiana <ios@nextcloud.com>
-rw-r--r-- | iOSClient/Utility/CCUtility.m | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/iOSClient/Utility/CCUtility.m b/iOSClient/Utility/CCUtility.m index a7def701a..089365bf0 100644 --- a/iOSClient/Utility/CCUtility.m +++ b/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); } |