From 9af5fc4e447863f0961bc60c1cf252c88f1088c2 Mon Sep 17 00:00:00 2001 From: Jey Date: Wed, 10 Dec 2008 09:07:28 -0800 Subject: [PATCH] Support absolute path, in OUT_DIR --- tools/atree/fs.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/atree/fs.cpp b/tools/atree/fs.cpp index 00f44c2c6f..997187986e 100644 --- a/tools/atree/fs.cpp +++ b/tools/atree/fs.cpp @@ -108,6 +108,10 @@ mkdir_recursively(const string& path) { int err; size_t pos = 0; + // For absolute pathnames, that starts with leading '/' + // use appropriate initial value. + if (path.length() != 0 and path[0] == '/') pos++; + while (true) { pos = path.find('/', pos); string p = path.substr(0, pos);