From 33b86cdd1741242837e6bd0a584adec52f9dd389 Mon Sep 17 00:00:00 2001 From: stujones11 Date: Sun, 20 Oct 2013 20:23:38 +0100 Subject: [PATCH] Use platform specific path separator for os.execute --- npcf/npcf.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/npcf/npcf.lua b/npcf/npcf.lua index d404f06..caadbc0 100644 --- a/npcf/npcf.lua +++ b/npcf/npcf.lua @@ -25,6 +25,7 @@ if input then index = minetest.deserialize(input:read('*all')) io.close(input) else + local dir = string.gsub(NPCF_DATADIR, "/", package.config:sub(1,1)) os.execute("mkdir "..NPCF_DATADIR) local output = io.open(NPCF_DATADIR.."/index.txt", 'w') if output then @@ -435,6 +436,7 @@ function npcf:load(npc_name, pos) end end minetest.log("error", "Failed to load "..npc_name) + return end minetest.log("error", "Attempt to load invalid NPC") end @@ -457,6 +459,7 @@ function npcf:save(luaentity) return 1 end minetest.log("error", "Failed to save NPC "..npc_name) + return end minetest.log("error", "Attempt to save invalid NPC") end