The temporary file should be removed when fail to get package id
Change-Id: I28827f4210bc7af0f7a9c081e87ac1c2dee1ccc9
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
}
tpk::parse::TPKConfigParser parser;
- if (!parser.ParseManifest(manifest_path))
+ if (!parser.ParseManifest(manifest_path)) {
+ ci::RemoveAll(tmp_path);
return {};
+ }
auto package_info = std::static_pointer_cast<const tpk::parse::PackageInfo>(
parser.GetManifestData(tpk::application_keys::kManifestKey));
- if (!package_info)
+ if (!package_info) {
+ ci::RemoveAll(tmp_path);
return {};
+ }
std::string pkg_id = package_info->package();
ci::RemoveAll(tmp_path);
return pkg_id;