From ba3276f4c1969b8f4ea6b8799e5cc90ccb2e80fd Mon Sep 17 00:00:00 2001 From: zwwhappy Date: Tue, 20 Sep 2016 15:58:27 +0800 Subject: [PATCH] Update HCPInstallationWorker.m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix when app verlay installation,www content update filed error is code: -7, description: "Can't copy files from previous release to the new release" --- src/ios/Updater/HCPInstallationWorker.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ios/Updater/HCPInstallationWorker.m b/src/ios/Updater/HCPInstallationWorker.m index 5a3aa967..6754eb93 100644 --- a/src/ios/Updater/HCPInstallationWorker.m +++ b/src/ios/Updater/HCPInstallationWorker.m @@ -193,6 +193,13 @@ - (BOOL)isUpdateValid:(NSError **)error { } - (BOOL)copyFilesFromCurrentReleaseToNewRelease:(NSError **)error { + //fix when app verlay installation,www content update filed + //error is code: -7, description: "Can't copy files from previous release to the new release" + if(_currentReleaseFS != nil && _currentReleaseFS.wwwFolder != nil + && [_currentReleaseFS.wwwFolder.path isEqualToString:_newReleaseFS.wwwFolder.path]) { + return YES; + } + *error = nil; // just in case check if previous www folder exists; if it does - remove it before copying new stuff