AppLogTag(OSP_INSTALLER, "[Tizen::Io] # appId = [%ls]", appId.GetPointer());
AppLogTag(OSP_INSTALLER, "[Tizen::Io] # apiVersion = [%ls]", apiVersion.GetPointer());
- if (apiVersion.CompareTo(L"2.0") == 0)
+ if (pContext->__isOspCompat == true)
{
- AppLogTag(OSP_INSTALLER, "[Tizen::Io] apiVersion is 2.0");
+ AppLogTag(OSP_INSTALLER, "[Tizen::Io] OSP 2.0 application");
if (_FileImpl::PrepareDataCaging(appRootPath, appId) == false)
{
}
else
{
- AppLogTag(OSP_INSTALLER, "[Tizen::Io] apiVersion is equal to or greater than 2.1");
+ AppLogTag(OSP_INSTALLER, "[Tizen::Io] apiVersion is equal to or greater than Tizen 2.0");
if (_FileImpl::CreateOspApplicationDirectories(appRootPath, appId) == false)
{
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 compatPath(rootPath);
+ compatPath.Append(L"/info/compat.info");
+ bool ospCompat = File::IsFileExist(compatPath);
+ result r = GetLastResult();
+ if (r == E_SUCCESS && ospCompat == true)
{
- //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)
{
- 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, "[Tizen::Io] Failed to unmount directories for 2.0 application, appRootPath: %ls",
+ rootPath.GetPointer());
+ return INSTALLER_ERROR_UNMOUNT_FAILED;
}
}
+ else if (r != E_SUCCESS)
+ {
+ AppLogTag(OSP_INSTALLER, "[Tizen::Io] Failed to access %ls", compatPath.GetPointer());
+ return INSTALLER_ERROR_UNMOUNT_FAILED;
+ }
AppLogTag(OSP_INSTALLER, "Directory::Remove - START");