mirror of
				https://gitcode.com/gh_mirrors/re/react-native-pushy.git
				synced 2025-10-31 21:33:12 +08:00 
			
		
		
		
	bug fixed
This commit is contained in:
		| @@ -160,30 +160,30 @@ 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 isDirectory = ([fm fileExistsAtPath:srcFullPath isDirectory:&isDirectory] && isDirectory); |         BOOL inDeletes = NO; | ||||||
|         if (isDirectory) { |         if (deletes) { | ||||||
|             if (![fm fileExistsAtPath:potentialDstPath isDirectory:nil]) { |             NSString *path = [@"assets" stringByAppendingPathComponent:subPath]; | ||||||
|                 [fm createDirectoryAtPath:potentialDstPath withIntermediateDirectories:YES attributes:nil error:err]; |             if (deletes[path]) { | ||||||
|                 if (err && *err) { |                 inDeletes = YES; | ||||||
|                     return; |  | ||||||
|                 } |  | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         else { |         if (!inDeletes) { | ||||||
|             BOOL inDeletes = NO; |             BOOL isDirectory = ([fm fileExistsAtPath:srcFullPath isDirectory:&isDirectory] && isDirectory); | ||||||
|             if (deletes) { |             if (isDirectory) { | ||||||
|                 NSString *path = [@"assets" stringByAppendingPathComponent:subPath]; |                 if (![fm fileExistsAtPath:potentialDstPath isDirectory:nil]) { | ||||||
|                 for (NSString *del in deletes) { |                     [fm createDirectoryAtPath:potentialDstPath withIntermediateDirectories:YES attributes:nil error:err]; | ||||||
|                     if ([subPath isEqualToString:path]) { |                     if (err && *err) { | ||||||
|                         inDeletes = YES; |                         return; | ||||||
|                         break; |  | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|             if (!inDeletes && ![fm fileExistsAtPath:potentialDstPath]) { |             else { | ||||||
|                 [fm copyItemAtPath:srcFullPath toPath:potentialDstPath error:err]; |                  | ||||||
|                 if (err && *err) { |                 if (![fm fileExistsAtPath:potentialDstPath]) { | ||||||
|                     return; |                     [fm copyItemAtPath:srcFullPath toPath:potentialDstPath error:err]; | ||||||
|  |                     if (err && *err) { | ||||||
|  |                         return; | ||||||
|  |                     } | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 lvbingru
					lvbingru