From 55999ee1187579179a70328808a4c856339ca97f Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Wed, 9 Oct 2013 09:57:48 +0200 Subject: Moved cMakeDir::MakeDir to cFile::CreateFolder. And exported to Lua. --- source/Log.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source/Log.cpp') 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 #include -#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; -- cgit v1.2.3