Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(663)

Unified Diff: chrome/browser/component_updater/recovery_component_installer.cc

Issue 719613002: Ensure that the recovery directory is created before moving the (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/component_updater/recovery_component_installer.cc
diff --git a/chrome/browser/component_updater/recovery_component_installer.cc b/chrome/browser/component_updater/recovery_component_installer.cc
index f6b5727a1331714c4db37d52a88d90631f33e55d..897230ea4e7ea65c461548a65dbf95883c0dd3f3 100644
--- a/chrome/browser/component_updater/recovery_component_installer.cc
+++ b/chrome/browser/component_updater/recovery_component_installer.cc
@@ -120,6 +120,11 @@ bool RecoveryComponentInstaller::Install(const base::DictionaryValue& manifest,
base::FilePath path;
if (!PathService::Get(DIR_RECOVERY_BASE, &path))
return false;
+ if (!base::PathExists(path)) {
+ if (!base::CreateDirectory(path)) {
+ return false;
+ }
+ }
path = path.AppendASCII(version.GetString());
if (base::PathExists(path) && !base::DeleteFile(path, true))
return false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698