aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Kristina Chodorow <kchodorow@google.com>2015-03-20 22:35:37 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2015-03-23 11:58:06 +0000
commit46af79d4c7401877cc34bf3a321624d8aa96923b (patch)
tree5c8ffa4377200814cbe078403d6f58daf38fdd46
parente2daa8109cc5f3afcc9faba052c36e1f49135390 (diff)
Recursively create cache dir
-- MOS_MIGRATED_REVID=89162431
-rw-r--r--src/main/cpp/blaze.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/main/cpp/blaze.cc b/src/main/cpp/blaze.cc
index 56ca81e31c..01074c7d28 100644
--- a/src/main/cpp/blaze.cc
+++ b/src/main/cpp/blaze.cc
@@ -1608,10 +1608,7 @@ static void CreateSecureOutputRoot() {
const char* root = globals->options.output_user_root.c_str();
struct stat fileinfo = {};
- if (mkdir(root, 0755) == 0) {
- return; // mkdir succeeded, no need to verify ownership/mode.
- }
- if (errno != EEXIST) {
+ if (MakeDirectories(root, 0755) == -1) {
pdie(blaze_exit_code::LOCAL_ENVIRONMENTAL_ERROR, "mkdir('%s')", root);
}