diff options
author | Maksim Andrianov <maksimandrianov1@gmail.com> | 2018-12-06 17:34:28 +0300 |
---|---|---|
committer | Tatiana Yan <tatiana.kondakova@gmail.com> | 2018-12-07 11:24:56 +0300 |
commit | 70661f172c8a28ba6613d9f44fc02d9060cd5b58 (patch) | |
tree | e71ec54dfaff6398a8a79f37dcda7595cab715af /platform | |
parent | 1513218db93f7c464198a477d767604afc032d91 (diff) |
[platform] Fixed MkDirRecursively
Diffstat (limited to 'platform')
-rw-r--r-- | platform/platform.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/platform/platform.cpp b/platform/platform.cpp index c7d4df8864..add77316ce 100644 --- a/platform/platform.cpp +++ b/platform/platform.cpp @@ -294,8 +294,9 @@ bool Platform::MkDirChecked(string const & dirName) // static bool Platform::MkDirRecursively(string const & dirName) { - auto const tokens = strings::Tokenize(dirName, base::GetNativeSeparator().c_str()); - string path = base::GetNativeSeparator(); + auto const sep = base::GetNativeSeparator(); + string path = strings::StartsWith(dirName, sep) ? sep : ""; + auto const tokens = strings::Tokenize(dirName, sep.c_str()); for (auto const & t : tokens) { path = base::JoinPath(path, t); |