commit | 9af5fc4e447863f0961bc60c1cf252c88f1088c2 | [log] [tgz] |
---|---|---|
author | Jey <jey.michael@gmail.com> | Wed Dec 10 09:07:28 2008 -0800 |
committer | Jean-Baptiste Queru <jbq@google.com> | Sun Nov 08 13:19:45 2009 -0800 |
tree | a2ff7a43c6ddec7a53e9c2af12e0ddf0b5089d43 | |
parent | ceb18f8923ca85203094b2b0702f5d81c0622c46 [diff] [blame] |
Support absolute path, in OUT_DIR
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 @@ { 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);