summaryrefslogtreecommitdiff
path: root/src/fs/paths.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-13 22:46:43 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-13 22:47:22 +0300
commit325bf99748654cda2296fc60eaebc6321c09c142 (patch)
tree4d871b755b5a974616cd621e1ecc38714d064f47 /src/fs/paths.cpp
parent9d7113b447aa28e911b662792d159bed260c0821 (diff)
downloadmanaverse-325bf99748654cda2296fc60eaebc6321c09c142.tar.gz
manaverse-325bf99748654cda2296fc60eaebc6321c09c142.tar.bz2
manaverse-325bf99748654cda2296fc60eaebc6321c09c142.tar.xz
manaverse-325bf99748654cda2296fc60eaebc6321c09c142.zip
Improve function dirSeparator.
Diffstat (limited to 'src/fs/paths.cpp')
-rw-r--r--src/fs/paths.cpp7
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)