From 325bf99748654cda2296fc60eaebc6321c09c142 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 13 Mar 2017 22:46:43 +0300 Subject: Improve function dirSeparator. --- src/fs/paths.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') 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) -- cgit v1.2.3-70-g09d2