diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-03-13 22:46:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-03-13 22:47:22 +0300 |
commit | 325bf99748654cda2296fc60eaebc6321c09c142 (patch) | |
tree | 4d871b755b5a974616cd621e1ecc38714d064f47 /src/fs | |
parent | 9d7113b447aa28e911b662792d159bed260c0821 (diff) | |
download | manaverse-325bf99748654cda2296fc60eaebc6321c09c142.tar.gz manaverse-325bf99748654cda2296fc60eaebc6321c09c142.tar.bz2 manaverse-325bf99748654cda2296fc60eaebc6321c09c142.tar.xz manaverse-325bf99748654cda2296fc60eaebc6321c09c142.zip |
Improve function dirSeparator.
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/paths.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fs/paths.cpp b/src/fs/paths.cpp index 050b9d00c..0fd7da622 100644 --- a/src/fs/paths.cpp +++ b/src/fs/paths.cpp @@ -118,10 +118,11 @@ void prepareFsPath(std::string &path) std::string &fixDirSeparators(std::string &str) { - if (dirSeparator[0] == '/') - return str; - +#ifdef WIN32 return replaceAll(str, "/", "\\"); +#else + return str; +#endif } std::string removeLast(const std::string &str) |