Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

fix when app verlay installation,www content update filed #225

Merged
merged 2 commits into from
Sep 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ private boolean init() {
* @return <code>true</code> if files are copied; <code>false</code> - otherwise.
*/
private boolean copyFilesFromCurrentReleaseToNewRelease() {
//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 != null && currentReleaseFS.getWwwFolder() != null
&& currentReleaseFS.getWwwFolder().equals(newReleaseFS.getWwwFolder())) {
return true;
}
boolean result = true;
final File currentWwwFolder = new File(currentReleaseFS.getWwwFolder());
final File newWwwFolder = new File(newReleaseFS.getWwwFolder());
Expand Down Expand Up @@ -241,4 +247,4 @@ public WorkerEvent result() {
}

// endregion
}
}
7 changes: 7 additions & 0 deletions src/ios/Updater/HCPInstallationWorker.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down