Skip to content

Commit e661bf4

Browse files
author
Preben Ludviksen
committed
Fixed so that 'do not backup' flag is added when necessary in moveFileFromUrl method.
1 parent 962d809 commit e661bf4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ios/RNFileSystem/RNFileSystem.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ + (void)moveFileFromUrl:(NSURL*)location toRelativePath:(NSString*)relativePath
9999
NSURL *baseDir = [RNFileSystem baseDirForStorage:storage];
100100
NSURL *fullPath = [baseDir URLByAppendingPathComponent:relativePath];
101101
[fileManager moveItemAtURL:location toURL:fullPath error:nil];
102+
if ([storage isEqual:STORAGE_IMPORTANT]) {
103+
[RNFileSystem addSkipBackupAttributeToItemAtPath:[fullPath path]];
104+
}
102105
}
103106

104107
RCT_EXPORT_MODULE()

0 commit comments

Comments
 (0)