diff options
author | madmaxoft <github@xoft.cz> | 2013-10-09 09:57:48 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-10-09 09:57:48 +0200 |
commit | 55999ee1187579179a70328808a4c856339ca97f (patch) | |
tree | 6335123ef5b8ff43b2e38e76282c45c61270b235 /source/Log.cpp | |
parent | Added static cFile functions to Lua API. (diff) | |
download | cuberite-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 '')
-rw-r--r-- | source/Log.cpp | 9 |
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; |