summaryrefslogtreecommitdiff
path: root/src/cat/LuaScriptInterface.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/LuaScriptInterface.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/LuaScriptInterface.cpp')
-rw-r--r--src/cat/LuaScriptInterface.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp
index b9124c5..56da7e0 100644
--- a/src/cat/LuaScriptInterface.cpp
+++ b/src/cat/LuaScriptInterface.cpp
@@ -1520,14 +1520,10 @@ int LuaScriptInterface::fileSystem_isDirectory(lua_State * l)
int LuaScriptInterface::fileSystem_makeDirectory(lua_State * l)
{
- const char * filename = lua_tostring(l, 1);
+ const char * dirname = lua_tostring(l, 1);
int ret = 0;
-#ifdef WIN
- ret = _mkdir(filename);
-#else
- ret = mkdir(filename, 0755);
-#endif
+ ret = Client::Ref().MakeDirectory(dirname);
lua_pushboolean(l, ret == 0);
return 1;
}