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

reset www folder on both upgrades and downgrades of application #67

Merged
merged 1 commit into from
Dec 14, 2015
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 @@ -419,7 +419,7 @@ private boolean isWwwFolderExists() {
* @return <code>true</code> if application was update; <code>false</code> - otherwise
*/
private boolean isApplicationHasBeenUpdated() {
return pluginInternalPrefs.getAppBuildVersion() < VersionHelper.applicationVersionCode(cordova.getActivity());
return pluginInternalPrefs.getAppBuildVersion() != VersionHelper.applicationVersionCode(cordova.getActivity());
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/ios/HCPPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ - (void)loadApplicationConfig {
*/
- (BOOL)isWWwFolderNeedsToBeInstalled {
NSFileManager *fileManager = [NSFileManager defaultManager];
BOOL isApplicationUpdated = [NSBundle applicationBuildVersion] > _pluginInternalPrefs.appBuildVersion;
BOOL isApplicationUpdated = [NSBundle applicationBuildVersion] != _pluginInternalPrefs.appBuildVersion;
BOOL isWWwFolderExists = [fileManager fileExistsAtPath:_filesStructure.wwwFolder.path];
BOOL isWWwFolderInstalled = _pluginInternalPrefs.isWwwFolderInstalled;

Expand Down