summaryrefslogtreecommitdiff
path: root/src/chatlogger.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-02-15 02:18:57 +0300
committerAndrei Karas <akaras@inbox.ru>2012-02-15 02:23:36 +0300
commit99bc9d1fb4bccae0785d731711e3b1009de1b394 (patch)
treee2ff1d19052011eceaa11baec788e5808dc68a3c /src/chatlogger.cpp
parenta72b60b50e639bcd309baadf4199252510cb8118 (diff)
downloadManaVerse-99bc9d1fb4bccae0785d731711e3b1009de1b394.tar.gz
ManaVerse-99bc9d1fb4bccae0785d731711e3b1009de1b394.tar.bz2
ManaVerse-99bc9d1fb4bccae0785d731711e3b1009de1b394.tar.xz
ManaVerse-99bc9d1fb4bccae0785d731711e3b1009de1b394.zip
Replace some hardcoded dir separator to physfs.
Diffstat (limited to 'src/chatlogger.cpp')
-rw-r--r--src/chatlogger.cpp12
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);
+ }
}
}