aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/cpp/blaze.cc
diff options
context:
space:
mode:
authorGravatar Thiago Farina <tfarina@chromium.org>2016-12-07 12:40:40 +0000
committerGravatar Laszlo Csomor <laszlocsomor@google.com>2016-12-07 12:53:56 +0000
commit227369a44a1061cfb26913cc2609c27801482368 (patch)
tree14f7e974d2b0ee706dbdd3a6663c4ab4ea93b306 /src/main/cpp/blaze.cc
parent12474d03da2b49447efd67e6b2ac93cd43539ec4 (diff)
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
Diffstat (limited to 'src/main/cpp/blaze.cc')
-rw-r--r--src/main/cpp/blaze.cc8
1 files changed, 4 insertions, 4 deletions
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);