summaryrefslogtreecommitdiffstats
path: root/app/acf_cli-controller.lua
diff options
context:
space:
mode:
Diffstat (limited to 'app/acf_cli-controller.lua')
-rw-r--r--app/acf_cli-controller.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/acf_cli-controller.lua b/app/acf_cli-controller.lua
index ef82c70..3d4a3e9 100644
--- a/app/acf_cli-controller.lua
+++ b/app/acf_cli-controller.lua
@@ -5,13 +5,15 @@ require("posix")
mvc = {}
mvc.on_load = function (self, parent)
-- Make sure we have some kind of sane defaults for libdir
- self.conf.libdir = self.conf.libdir or ( posix.dirname(self.conf.appdir) .. "/lib/" )
+ self.conf.libdir = self.conf.libdir or ( string.match(self.conf.appdir, "[^,]+/") .. "/lib/" )
self.conf.script = ""
self.conf.default_prefix = "/acf-util/"
self.conf.default_controller = "welcome"
-- this sets the package path for us and our children
- package.path= self.conf.libdir .. "?.lua;" .. package.path
+ for p in string.gmatch(self.conf.libdir, "[^,]+") do
+ package.path= p .. "?.lua;" .. package.path
+ end
self.session = {}
local x=require("session")