|
@@ -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);
|
|
}
|
|
}
|
|
|
|
|