fix var for linux users

This commit is contained in:
Brett O'Donnell 2012-09-29 23:05:25 +09:30
parent cfdab542ba
commit 6bc3371d0d

View File

@ -21,7 +21,7 @@ towntest_chest.npc = {}
towntest_chest.get_files = function(size)
local directory = minetest.get_modpath("towntest_chest").."/buildings"
local output
if os.getenv('home')~=nil then
if os.getenv('HOME')~=nil then
output = io.execute('ls -a "'..directory..'/*.we"') -- linux/mac
else
output = io.popen('dir "'..directory..'\\*.we" /b') -- windows