diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-02-24 22:59:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-02-24 22:59:54 +0300 |
commit | 6ce49efadfadd8eacb048df274979736bb04daf0 (patch) | |
tree | 60d4c2c2a803db003f6fa28e932468e925112580 /src/chatlogger.cpp | |
parent | 466829aef10af6b95d0f443226e8549f4399b567 (diff) | |
download | mv-6ce49efadfadd8eacb048df274979736bb04daf0.tar.gz mv-6ce49efadfadd8eacb048df274979736bb04daf0.tar.bz2 mv-6ce49efadfadd8eacb048df274979736bb04daf0.tar.xz mv-6ce49efadfadd8eacb048df274979736bb04daf0.zip |
Improve string usage in some files.
Diffstat (limited to 'src/chatlogger.cpp')
-rw-r--r-- | src/chatlogger.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/chatlogger.cpp b/src/chatlogger.cpp index 7fd3a6509..a7a660036 100644 --- a/src/chatlogger.cpp +++ b/src/chatlogger.cpp @@ -171,10 +171,11 @@ void ChatLogger::setServerName(const std::string &serverName) secureName(mServerName); if (mLogDir != "") { - DIR *const dir = opendir((mLogDir + dirSeparator - + mServerName).c_str()); + const char *const name = (std::string(mLogDir).append(dirSeparator) + .append(mServerName)).c_str(); + DIR *const dir = opendir(name); if (!dir) - mkdir_r((mLogDir + dirSeparator + mServerName).c_str()); + mkdir_r(name); else closedir(dir); } |