summaryrefslogtreecommitdiffstats
path: root/source/Log.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-10-09 09:57:48 +0200
committermadmaxoft <github@xoft.cz>2013-10-09 09:57:48 +0200
commit55999ee1187579179a70328808a4c856339ca97f (patch)
tree6335123ef5b8ff43b2e38e76282c45c61270b235 /source/Log.cpp
parentAdded static cFile functions to Lua API. (diff)
downloadcuberite-55999ee1187579179a70328808a4c856339ca97f.tar
cuberite-55999ee1187579179a70328808a4c856339ca97f.tar.gz
cuberite-55999ee1187579179a70328808a4c856339ca97f.tar.bz2
cuberite-55999ee1187579179a70328808a4c856339ca97f.tar.lz
cuberite-55999ee1187579179a70328808a4c856339ca97f.tar.xz
cuberite-55999ee1187579179a70328808a4c856339ca97f.tar.zst
cuberite-55999ee1187579179a70328808a4c856339ca97f.zip
Diffstat (limited to 'source/Log.cpp')
-rw-r--r--source/Log.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/Log.cpp b/source/Log.cpp
index c8937c380..fc19595db 100644
--- a/source/Log.cpp
+++ b/source/Log.cpp
@@ -5,7 +5,6 @@
#include <fstream>
#include <ctime>
-#include "OSSupport/MakeDir.h"
#include "OSSupport/IsThread.h"
#if defined(ANDROID_NDK)
@@ -24,9 +23,9 @@ cLog::cLog(const AString & a_FileName )
s_Log = this;
// create logs directory
- cMakeDir::MakeDir("logs");
+ cFile::CreateFolder(FILE_IO_PREFIX + AString("logs"));
- OpenLog( (FILE_IO_PREFIX + std::string("logs/") + a_FileName).c_str() );
+ OpenLog((FILE_IO_PREFIX + AString("logs/") + a_FileName).c_str() );
}
@@ -45,8 +44,10 @@ cLog::~cLog()
cLog* cLog::GetInstance()
{
- if(s_Log)
+ if (s_Log != NULL)
+ {
return s_Log;
+ }
new cLog("log.txt");
return s_Log;