summaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rwxr-xr-xwww/cgi-bin/mvc.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/www/cgi-bin/mvc.lua b/www/cgi-bin/mvc.lua
index 78cdc0e..41aa9db 100755
--- a/www/cgi-bin/mvc.lua
+++ b/www/cgi-bin/mvc.lua
@@ -222,8 +222,13 @@ soft_require = function (self, name )
-- and if it doesnt exist silently fail.
-- This version allows things from /usr/local/lua/5.1 to
-- be loaded
- package.path = p .. posix.dirname(name) .. "/?.lua;" .. package.path
- local t = require(posix.basename(name))
+ package.path = p .. "/?.lua;" .. package.path
+ local t
+ if posix.dirname(name) == "." then
+ t = require(posix.basename(name))
+ else
+ t = require(posix.basename(posix.dirname(name)).."."..posix.basename(name))
+ end
package.path = PATH
return t
end