diff options
author | Christian Pointner <equinox@spreadspace.org> | 2010-11-17 01:09:38 +0000 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2010-11-17 01:09:38 +0000 |
commit | d025a7dae454610c353ec1428dc969ce9e7e9f79 (patch) | |
tree | b36b1e4fd38df01c7fc9fde78c9ab65929a692af | |
parent | using default values for implicit debug shell (diff) |
fixed loaderpath at module_list
git-svn-id: https://svn.spreadspace.org/gcsd/trunk@34 ac14a137-c7f1-4531-abe0-07747231d213
-rw-r--r-- | src/module_list.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/module_list.lua b/src/module_list.lua index b42f2ec..89d4920 100644 --- a/src/module_list.lua +++ b/src/module_list.lua @@ -37,17 +37,17 @@ module_list = {} module_list.classes = {} local mt = {} function mt.__index(table, key) - local old_path = package.path - package.path = "./modules/?.lua" - local value = rawget(table, key) if(value ~= nil) then return value end log.printf(log.DEBUG, "load module class: %s", key) + + local old_path = package.path + package.path = "./modules/?.lua" value = require(key) - rawset(table, key, value) - package.path = old_path + + rawset(table, key, value) return value end setmetatable(module_list.classes, mt) |