summaryrefslogtreecommitdiff
path: root/src/fs
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
parent9d7113b447aa28e911b662792d159bed260c0821 (diff)
downloadmv-325bf99748654cda2296fc60eaebc6321c09c142.tar.gz
mv-325bf99748654cda2296fc60eaebc6321c09c142.tar.bz2
mv-325bf99748654cda2296fc60eaebc6321c09c142.tar.xz
mv-325bf99748654cda2296fc60eaebc6321c09c142.zip
Improve function dirSeparator.
Diffstat (limited to 'src/fs')
-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)