summaryrefslogtreecommitdiff
path: root/src/cat/LegacyLuaAPI.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2012-10-19 23:17:15 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-10-26 14:15:38 (GMT)
commit3a29fc0268dbda68e80f7de586c6692ba7a11565 (patch)
treefa2ae1ded7149c2b56c4dcecac032e991b30d00e /src/cat/LegacyLuaAPI.cpp
parente2622657f076ef943d051593d0969306daf15f32 (diff)
downloadpowder-3a29fc0268dbda68e80f7de586c6692ba7a11565.zip
powder-3a29fc0268dbda68e80f7de586c6692ba7a11565.tar.gz
Save local saves as current name option (overwrites them automatically). Fix filename not showing when first saving a local save
Diffstat (limited to 'src/cat/LegacyLuaAPI.cpp')
-rw-r--r--src/cat/LegacyLuaAPI.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/cat/LegacyLuaAPI.cpp b/src/cat/LegacyLuaAPI.cpp
index dfebf01..d6e6ce6 100644
--- a/src/cat/LegacyLuaAPI.cpp
+++ b/src/cat/LegacyLuaAPI.cpp
@@ -16,11 +16,6 @@
#include "simulation/Simulation.h"
#include "game/GameModel.h"
-#ifdef WIN
-#include <direct.h>
-#else
-#include <sys/stat.h>
-#endif
#include <time.h>
#ifndef FFI
@@ -1747,11 +1742,7 @@ int luatpt_getscript(lua_State* l)
filename = new char[fileauthor.length()+fileid.length()+strlen(PATH_SEP)+strlen(LOCAL_LUA_DIR)+6];
sprintf(filename, LOCAL_LUA_DIR PATH_SEP "%s_%s.lua", fileauthor.c_str(), fileid.c_str());
-#ifdef WIN
- _mkdir(LOCAL_LUA_DIR);
-#else
- mkdir(LOCAL_LUA_DIR, 0755);
-#endif
+ Client::Ref().MakeDirectory(LOCAL_LUA_DIR);
outputfile = fopen(filename, "r");
if(outputfile)