summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinc/InstallerDefs.h2
-rwxr-xr-xsrc/Step/UninstallStep.cpp25
2 files changed, 26 insertions, 1 deletions
diff --git a/inc/InstallerDefs.h b/inc/InstallerDefs.h
index 295e72c..f86f3ff 100755
--- a/inc/InstallerDefs.h
+++ b/inc/InstallerDefs.h
@@ -186,7 +186,7 @@ enum InstallerError
INSTALLER_ERROR_CERT_ROOT,
INSTALLER_ERROR_DRM,
INSTALLER_ERROR_INTEGRITY_FAILED,
-
+ INSTALLER_ERROR_UNMOUNT_FAILED
};
enum InstallerOperation
diff --git a/src/Step/UninstallStep.cpp b/src/Step/UninstallStep.cpp
index f3e6666..75bb455 100755
--- a/src/Step/UninstallStep.cpp
+++ b/src/Step/UninstallStep.cpp
@@ -215,6 +215,31 @@ UninstallStep::OnStateRemoveDir(void)
rootPath = pPackageInfoImpl->GetAppRootPath();
AppLogTag(OSP_INSTALLER, "rootPath[%ls]", rootPath.GetPointer());
+ String versionFile(rootPath);
+ versionFile.Append(L"/info/version.info");
+
+ File file;
+ result r = file.Construct(versionFile, "r");
+ TryReturn(r == E_SUCCESS || r == E_FILE_NOT_FOUND, INSTALLER_ERROR_UNMOUNT_FAILED, "Failed to open version.info");
+ if (r == E_SUCCESS)
+ {
+ //String apiVersion = pPackageInfoImpl->GetAppApiVersion();
+ //if (pPackageInfoImpl->GetAppApiVersion() == L"2.0")
+ String version;
+ r = file.Read(version);
+ TryReturn(r == E_SUCCESS, INSTALLER_ERROR_UNMOUNT_FAILED, "Failed to read version.info");
+
+ if (version.Contains(L"2.0"))
+ {
+ if (_FileImpl::FinalizeDataCaging(rootPath) == false)
+ {
+ AppLogTag(OSP_INSTALLER, "Failed to unmount directories for 2.0 application, appRootPath: %ls",
+ rootPath.GetPointer());
+ return INSTALLER_ERROR_UNMOUNT_FAILED;
+ }
+ }
+ }
+
AppLogTag(OSP_INSTALLER, "Directory::Remove - START");
if (__pContext->IsHybridService() == true)