From 227369a44a1061cfb26913cc2609c27801482368 Mon Sep 17 00:00:00 2001 From: Thiago Farina Date: Wed, 7 Dec 2016 12:40:40 +0000 Subject: move MakeDirectories() into file_platform.h This way we can remove the dependency on blaze_util (which is Bazel's client specific) from singlejar. This work was made possible by commit 49970e0136d0: ("Bazel client: platform-specific {Read,Write}File"). -- Change-Id: I6e95fb9119a271e4d48cbe2eefc1d5354ee188aa Reviewed-on: https://cr.bazel.build/7650 PiperOrigin-RevId: 141294165 MOS_MIGRATED_REVID=141294165 --- src/main/cpp/blaze.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/cpp/blaze.cc') diff --git a/src/main/cpp/blaze.cc b/src/main/cpp/blaze.cc index 6f63e16c1d..4c7b40131d 100644 --- a/src/main/cpp/blaze.cc +++ b/src/main/cpp/blaze.cc @@ -714,7 +714,7 @@ static void StartServerAndConnect(BlazeServer *server) { // The server dir has the socket, so we don't allow access by other // users. - if (!MakeDirectories(server_dir, 0700)) { + if (!blaze_util::MakeDirectories(server_dir, 0700)) { pdie(blaze_exit_code::LOCAL_ENVIRONMENTAL_ERROR, "server directory '%s' could not be created", server_dir.c_str()); } @@ -799,7 +799,7 @@ class ExtractBlazeZipProcessor : public devtools_ijar::ZipExtractorProcessor { virtual void Process(const char *filename, const devtools_ijar::u4 attr, const devtools_ijar::u1 *data, const size_t size) { string path = blaze_util::JoinPath(embedded_binaries_, filename); - if (!MakeDirectories(blaze_util::Dirname(path), 0777)) { + if (!blaze_util::MakeDirectories(blaze_util::Dirname(path), 0777)) { pdie(blaze_exit_code::INTERNAL_ERROR, "couldn't create '%s'", path.c_str()); } @@ -820,7 +820,7 @@ class ExtractBlazeZipProcessor : public devtools_ijar::ZipExtractorProcessor { static void ActuallyExtractData(const string &argv0, const string &embedded_binaries) { ExtractBlazeZipProcessor processor(embedded_binaries); - if (!MakeDirectories(embedded_binaries, 0777)) { + if (!blaze_util::MakeDirectories(embedded_binaries, 0777)) { pdie(blaze_exit_code::INTERNAL_ERROR, "couldn't create '%s'", embedded_binaries.c_str()); } @@ -1177,7 +1177,7 @@ static void ComputeBaseDirectories(const string &self_path) { const char *output_base = globals->options->output_base.c_str(); if (!blaze_util::PathExists(globals->options->output_base)) { - if (!MakeDirectories(globals->options->output_base, 0777)) { + if (!blaze_util::MakeDirectories(globals->options->output_base, 0777)) { pdie(blaze_exit_code::LOCAL_ENVIRONMENTAL_ERROR, "Output base directory '%s' could not be created", output_base); -- cgit v1.2.3