SysTryReturn(NID_APP, false, null, E_UNSUPPORTED_FORMAT, "invalid extension! - packagePath = [%s], extension = [%s]", pPackagePath.get(), pExtension.get());
}
+ SetLastResult(E_SUCCESS);
return pPackageInfo.release();
}
result r = unzipper.Construct(__packagePath);
SysTryReturn(NID_APP, !IsFailed(r), false, E_SYSTEM, "unzipper.Construct() failed.");
+ ZipEntry entry;
+ r = unzipper.GetEntry(iconRelPath, entry);
+ if (IsFailed(r))
+ {
+ AppLog("fallback, old path = [%ls]", iconRelPath.GetPointer());
+
+ String densityXhigh("screen-density-xhigh/");
+ String densityHigh("screen-density-high/");
+
+ if (iconRelPath.Contains(densityXhigh) == true)
+ {
+ iconRelPath.Replace(densityXhigh, densityHigh);
+ }
+ else if (iconRelPath.Contains(densityHigh) == true)
+ {
+ iconRelPath.Replace(densityHigh, densityXhigh);
+ }
+ else
+ {
+ AppLog("invalid icon [%ls]", iconRelPath.GetPointer());
+ return false;
+ }
+
+ AppLog("fallback, new path = [%ls]", iconRelPath.GetPointer());
+ }
+
r = unzipper.UnzipTo(tmp, iconRelPath);
if (!IsFailed(r))
{
}
else
{
- SysLog(NID_APP, "file.Construct() failed.", tempIconPath.GetPointer());
+ SysLog(NID_APP, "file.Construct(%ls) failed.", tempIconPath.GetPointer());
}
}
else
{
- SysLog(NID_APP, "UnzipTo() is failed.");
+ SysLog(NID_APP, "UnzipTo(%ls) is failed.", iconRelPath.GetPointer());
}
}