From bebc6b44ca960d9d9a7ab93585bfd6e099cd589e Mon Sep 17 00:00:00 2001 From: lvbingru Date: Mon, 4 Apr 2016 23:22:09 +0800 Subject: [PATCH] bug fixed --- ios/RCTHotUpdate/RCTHotUpdate.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/RCTHotUpdate/RCTHotUpdate.m b/ios/RCTHotUpdate/RCTHotUpdate.m index 91b69ef..7bced60 100644 --- a/ios/RCTHotUpdate/RCTHotUpdate.m +++ b/ios/RCTHotUpdate/RCTHotUpdate.m @@ -197,7 +197,7 @@ RCT_EXPORT_METHOD(removePreviousUpdates:(NSDictionary *)options) return; } - NSString *zipFilePath = [dir stringByAppendingPathComponent:[NSString stringWithFormat:@"%@, %@",hashName, [self zipExtension:type]]]; + NSString *zipFilePath = [dir stringByAppendingPathComponent:[NSString stringWithFormat:@"%@%@",hashName, [self zipExtension:type]]]; NSString *unzipDir = [dir stringByAppendingPathComponent:hashName]; RCTLogInfo(@"RNUpdate -- download file %@", updateUrl); @@ -214,7 +214,7 @@ RCT_EXPORT_METHOD(removePreviousUpdates:(NSDictionary *)options) else { RCTLogInfo(@"RNUpdate -- unzip file %@", zipFilePath); NSString *unzipFilePath = [dir stringByAppendingPathComponent:hashName]; - [_fileManager unzipFileAtPath:unzipDir toDestination:unzipFilePath progressHandler:^(NSString *entry,long entryNumber, long total) { + [_fileManager unzipFileAtPath:zipFilePath toDestination:unzipFilePath progressHandler:^(NSString *entry,long entryNumber, long total) { [self.bridge.eventDispatcher sendAppEventWithName:EVENT_PROGRESS_UNZIP body:@{ PARAM_PROGRESS_RECEIVED:[NSNumber numberWithLong:entryNumber],