const char kCache[] = "cache";
const char kDataLocation[] = "data";
-const char kSharedLocation[] = "shared";
+const char kSharedResLocation[] = "shared";
} // namespace
if (!MoveAppStorage(backup_path_,
context_->pkg_path.get(),
- kSharedLocation, true)) {
+ kSharedResLocation, true)) {
LOG(ERROR) << "Failed to restore shared directory for widget in update";
return Status::APP_DIR_ERROR;
}
if (!MoveAppStorage(context_->pkg_path.get(),
backup_path_,
- kSharedLocation)) {
+ kSharedResLocation)) {
LOG(ERROR) << "Failed to restore shared directory for package in update";
ret = Status::APP_DIR_ERROR;
}
bool StepParseManifest::FillAuthorInfo(manifest_x* manifest) {
std::shared_ptr<const tpk::parse::AuthorInfo> author_info =
std::static_pointer_cast<const tpk::parse::AuthorInfo>(
- parser_->GetManifestData(app_keys::kAuthorKey));
+ parser_->GetManifestData(tpk::parse::AuthorInfo::Key()));
- if (!author_info) {
- LOG(ERROR) << "Author data has not been found.";
- return false;
- }
+ if (!author_info)
+ return true;
author_x* author = reinterpret_cast<author_x*>(calloc(1, sizeof(author_x)));
author->text = strdup(author_info->name().c_str());
return false;
if (!FillPrivileges(manifest))
return false;
+ if (!FillAuthorInfo(manifest))
+ return false;
if (!FillAccounts())
return false;
if (!FillShortcuts())
namespace {
const char kDataLocation[] = "data";
-const char kSharedLocation[] = "shared";
+const char kSharedResLocation[] = "shared";
} // namespace
namespace bf = boost::filesystem;
context_->pkg_path.get());
if (bf::exists(backup_path)) {
MoveAppStorage(context_->pkg_path.get(), backup_path, kDataLocation);
- MoveAppStorage(context_->pkg_path.get(), backup_path, kSharedLocation);
+ MoveAppStorage(context_->pkg_path.get(), backup_path, kSharedResLocation);
}
}
return Status::OK;