mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-11-01 05:43:11 +08:00
bug fixed
This commit is contained in:
@@ -160,6 +160,14 @@ completionHandler:(void (^)(NSError *error))completionHandler
|
|||||||
NSString *srcFullPath = [srcDir stringByAppendingPathComponent:subPath];
|
NSString *srcFullPath = [srcDir stringByAppendingPathComponent:subPath];
|
||||||
NSString *potentialDstPath = [dstDir stringByAppendingPathComponent:subPath];
|
NSString *potentialDstPath = [dstDir stringByAppendingPathComponent:subPath];
|
||||||
|
|
||||||
|
BOOL inDeletes = NO;
|
||||||
|
if (deletes) {
|
||||||
|
NSString *path = [@"assets" stringByAppendingPathComponent:subPath];
|
||||||
|
if (deletes[path]) {
|
||||||
|
inDeletes = YES;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!inDeletes) {
|
||||||
BOOL isDirectory = ([fm fileExistsAtPath:srcFullPath isDirectory:&isDirectory] && isDirectory);
|
BOOL isDirectory = ([fm fileExistsAtPath:srcFullPath isDirectory:&isDirectory] && isDirectory);
|
||||||
if (isDirectory) {
|
if (isDirectory) {
|
||||||
if (![fm fileExistsAtPath:potentialDstPath isDirectory:nil]) {
|
if (![fm fileExistsAtPath:potentialDstPath isDirectory:nil]) {
|
||||||
@@ -170,17 +178,8 @@ completionHandler:(void (^)(NSError *error))completionHandler
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BOOL inDeletes = NO;
|
|
||||||
if (deletes) {
|
if (![fm fileExistsAtPath:potentialDstPath]) {
|
||||||
NSString *path = [@"assets" stringByAppendingPathComponent:subPath];
|
|
||||||
for (NSString *del in deletes) {
|
|
||||||
if ([subPath isEqualToString:path]) {
|
|
||||||
inDeletes = YES;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!inDeletes && ![fm fileExistsAtPath:potentialDstPath]) {
|
|
||||||
[fm copyItemAtPath:srcFullPath toPath:potentialDstPath error:err];
|
[fm copyItemAtPath:srcFullPath toPath:potentialDstPath error:err];
|
||||||
if (err && *err) {
|
if (err && *err) {
|
||||||
return;
|
return;
|
||||||
@@ -189,5 +188,6 @@ completionHandler:(void (^)(NSError *error))completionHandler
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
Reference in New Issue
Block a user