diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-02-15 02:18:57 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-02-15 02:23:36 +0300 |
commit | 99bc9d1fb4bccae0785d731711e3b1009de1b394 (patch) | |
tree | e2ff1d19052011eceaa11baec788e5808dc68a3c /src/chatlogger.cpp | |
parent | a72b60b50e639bcd309baadf4199252510cb8118 (diff) | |
download | mv-99bc9d1fb4bccae0785d731711e3b1009de1b394.tar.gz mv-99bc9d1fb4bccae0785d731711e3b1009de1b394.tar.bz2 mv-99bc9d1fb4bccae0785d731711e3b1009de1b394.tar.xz mv-99bc9d1fb4bccae0785d731711e3b1009de1b394.zip |
Replace some hardcoded dir separator to physfs.
Diffstat (limited to 'src/chatlogger.cpp')
-rw-r--r-- | src/chatlogger.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/chatlogger.cpp b/src/chatlogger.cpp index 33763e561..b8418edda 100644 --- a/src/chatlogger.cpp +++ b/src/chatlogger.cpp @@ -42,6 +42,8 @@ #include "utils/mkdir.h" #include "utils/stringutils.h" +#include <physfs.h> + #include "debug.h" ChatLogger::ChatLogger() : @@ -172,11 +174,17 @@ void ChatLogger::setServerName(const std::string &serverName) secureName(mServerName); if (mLogDir != "") { - DIR *dir = opendir((mLogDir + "/" + mServerName).c_str()); + DIR *dir = opendir((mLogDir + PHYSFS_getDirSeparator() + + mServerName).c_str()); if (!dir) - mkdir_r((mLogDir + "/" + mServerName).c_str()); + { + mkdir_r((mLogDir + PHYSFS_getDirSeparator() + + mServerName).c_str()); + } else + { closedir(dir); + } } } |