From f582b58c2e8d9bb09bf2a4492d653658b684d571 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Sun, 8 Mar 2015 16:21:09 +0100 Subject: [PATCH] Fixed "files" directory creation Related to #444 --- src/script/scriptfunc.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/script/scriptfunc.cpp b/src/script/scriptfunc.cpp index 23996506..3fd3add5 100644 --- a/src/script/scriptfunc.cpp +++ b/src/script/scriptfunc.cpp @@ -3245,6 +3245,7 @@ void PrepareFilename(CBotString &filename) filename = filename.Mid(pos+1); // also removes the drive letter C: } + boost::filesystem::create_directories(CScriptFunctions::m_filesDir); filename = CBotString(CScriptFunctions::m_filesDir.c_str()) + CBotString("/") + filename; CLogger::GetInstancePointer()->Debug("CBot accessing file '%s'\n", static_cast(filename)); }