namespace common_installer {
namespace security {
-bool StepRecoverSecurity::Check() {
+bool StepRecoverSecurity::Check(bool is_update) {
if (context_->pkg_path.get().empty())
return false;
- if (!boost::filesystem::exists(context_->pkg_path.get()))
+ if (!boost::filesystem::exists(context_->pkg_path.get()) && is_update)
return false;
if (context_->pkgid.get().empty())
return false;
}
Step::Status StepRecoverSecurity::RecoveryNew() {
- if (!Check())
+ if (!Check(false))
return Status::OK;
std::string error_message;
if (!UnregisterSecurityContextForManifest(
}
Step::Status StepRecoverSecurity::RecoveryUpdate() {
- if (!Check()) {
+ if (!Check(true)) {
LOG(ERROR) << "Invalid parameters";
return Status::INVALID_VALUE;
}