diff options
author | Jey <jey.michael@gmail.com> | 2008-12-10 09:07:28 -0800 |
---|---|---|
committer | Jean-Baptiste Queru <jbq@google.com> | 2009-11-08 13:19:45 -0800 |
commit | 9af5fc4e447863f0961bc60c1cf252c88f1088c2 (patch) | |
tree | a2ff7a43c6ddec7a53e9c2af12e0ddf0b5089d43 /tools/atree | |
parent | ceb18f8923ca85203094b2b0702f5d81c0622c46 (diff) | |
download | build-9af5fc4e447863f0961bc60c1cf252c88f1088c2.zip build-9af5fc4e447863f0961bc60c1cf252c88f1088c2.tar.gz build-9af5fc4e447863f0961bc60c1cf252c88f1088c2.tar.bz2 |
Support absolute path, in OUT_DIR
Diffstat (limited to 'tools/atree')
-rw-r--r-- | tools/atree/fs.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/atree/fs.cpp b/tools/atree/fs.cpp index 00f44c2..9971879 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); |