Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/ios.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarinofaggiana <ios@nextcloud.com>2022-08-05 14:58:14 +0300
committermarinofaggiana <ios@nextcloud.com>2022-08-05 14:58:14 +0300
commitc32ffbb3c6a315933302125f3afc2caf20a00ede (patch)
tree995bf1ef6b261d65e0fe45387195d79312487844
parent56769e22068c14595483e77248ac7506e5c483f6 (diff)
fix code
Signed-off-by: marinofaggiana <ios@nextcloud.com>
-rw-r--r--iOSClient/Utility/CCUtility.m8
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);
}