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)); }