From 49631972db5b965413d4bbe36983a8d5bd203183 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 2 Apr 2017 06:23:19 +0300 Subject: Use pathJoin for concatinate some paths. --- src/test/testlauncher.cpp | 4 +++- src/test/testmain.cpp | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/test') diff --git a/src/test/testlauncher.cpp b/src/test/testlauncher.cpp index b05091ddd..ffb183cd0 100644 --- a/src/test/testlauncher.cpp +++ b/src/test/testlauncher.cpp @@ -33,6 +33,8 @@ #include "gui/fonts/font.h" +#include "utils/stringutils.h" + #include "render/graphics.h" #include "render/vertexes/imagecollection.h" @@ -65,7 +67,7 @@ TestLauncher::TestLauncher(std::string test) : mTest(test), file() { - file.open((settings.localDataDir + std::string("/test.log")).c_str(), + file.open(pathJoin(settings.localDataDir, "test.log").c_str(), std::ios::out); } diff --git a/src/test/testmain.cpp b/src/test/testmain.cpp index fad34dbb0..540ec5cf5 100644 --- a/src/test/testmain.cpp +++ b/src/test/testmain.cpp @@ -40,7 +40,7 @@ TestMain::TestMain() : mConfig() { fileName = getSelfName(); - log->setLogFile(settings.localDataDir + std::string("/manaplustest.log")); + log->setLogFile(pathJoin(settings.localDataDir, "manaplustest.log")); } TestMain::~TestMain() @@ -320,7 +320,7 @@ int TestMain::readValue(const int ver, int def) std::string tmp; int var; std::ifstream file; - file.open((settings.localDataDir + std::string("/test.log")).c_str(), + file.open(pathJoin(settings.localDataDir, "test.log").c_str(), std::ios::in); if (!getline(file, tmp)) { -- cgit v1.2.3-70-g09d2