RequestMode::GLOBAL : RequestMode::USER;
}
+// Now, preload app is always installed RO location.
const char *GetRootAppPath(bool is_preload) {
return GetRequestMode() == RequestMode::USER ?
tzplatform_getenv(TZ_USER_APP) : is_preload ?
Step::Status StepBackupIcons::process() {
// gather icon info
- for (auto iter = bf::directory_iterator(getIconPath(context_->uid.get()));
+ for (auto iter = bf::directory_iterator(getIconPath(context_->uid.get(),
+ context_->is_preload_request.get()));
iter != bf::directory_iterator(); ++iter) {
if (!bf::is_regular_file(iter->path()))
continue;
context_->pkgid.set(pkgmgr_->GetRequestInfo());
bf::path package_directory =
context_->root_application_path.get() / context_->pkgid.get();
- bf::path xml_path = bf::path(getUserManifestPath(context_->uid.get()))
+ bf::path xml_path =
+ bf::path(getUserManifestPath(context_->uid.get(),
+ context_->is_preload_request.get()))
/ bf::path(context_->pkgid.get());
xml_path += ".xml";
context_->unpacked_dir_path.set(package_directory);
}
Step::Status StepCreateIcons::process() {
- bf::path destination = getIconPath(context_->uid.get());
+ bf::path destination =
+ getIconPath(context_->uid.get(), context_->is_preload_request.get());
bs::error_code error;
if (!bf::exists(destination)) {
bf::create_directories(destination, error);
break;
}
case ManifestLocation::INSTALLED: {
- bf::path xml_path = bf::path(getUserManifestPath(context_->uid.get()))
+ bf::path xml_path =
+ bf::path(getUserManifestPath(context_->uid.get(),
+ context_->is_preload_request.get()))
/ bf::path(context_->pkgid.get());
xml_path += ".xml";
context_->xml_path.set(xml_path);
bool StepRecoverApplication::SetXmlPaths() {
if (context_->pkgid.get().empty())
return false;
- bf::path xml_path = bf::path(getUserManifestPath(context_->uid.get()))
+ bf::path xml_path =
+ bf::path(getUserManifestPath(context_->uid.get(),
+ context_->is_preload_request.get()))
/ context_->pkgid.get();
xml_path += ".xml";
context_->xml_path.set(xml_path);
return false;
// gather icon info
- for (auto iter = bf::directory_iterator(getIconPath(context_->uid.get()));
+ for (auto iter = bf::directory_iterator(getIconPath(context_->uid.get(),
+ context_->is_preload_request.get()));
iter != bf::directory_iterator(); ++iter) {
if (!bf::is_regular_file(iter->path()))
continue;
bool StepRecoverManifest::SetXmlPaths() {
if (context_->pkgid.get().empty())
return false;
- bf::path xml_path = bf::path(getUserManifestPath(context_->uid.get()))
+ bf::path xml_path =
+ bf::path(getUserManifestPath(context_->uid.get(),
+ context_->is_preload_request.get()))
/ context_->pkgid.get();
xml_path += ".xml";
context_->xml_path.set(xml_path);
}
Step::Status StepRemoveIcons::process() {
- for (auto iter = bf::directory_iterator(getIconPath(context_->uid.get()));
+ for (auto iter = bf::directory_iterator(getIconPath(context_->uid.get(),
+ context_->is_preload_request.get()));
iter != bf::directory_iterator(); ++iter) {
if (!bf::is_regular_file(iter->path()))
continue;