From b264e1673bee009cb5d67c9c4e6bf684dcc285f8 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Mon, 4 Jan 2010 08:53:32 +0000 Subject: Made libdir load order match appdir load order, bumped to 0.9.1 --- Makefile | 2 +- acf.conf | 4 +++- app/acf_www-controller.lua | 4 +--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 01f8aa0..b28dff9 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ APP_NAME=core PACKAGE=acf-$(APP_NAME) -VERSION=0.9.0 +VERSION=0.9.1 P=$(PACKAGE)-$(VERSION) DISTDIR:=$(shell pwd)/$(P) diff --git a/acf.conf b/acf.conf index e8cb0ac..19c3dbd 100644 --- a/acf.conf +++ b/acf.conf @@ -2,7 +2,9 @@ # Directories where the application resides # appdir and libdir may be comma-separated lists -# do not place same name lib or prefix/controller files in multiple directories +# paths are checked from left to right +# for .lua and .lsp files - the first found file will be used +# for .roles and .menu files - all files will be combined appdir=/usr/share/acf/app/ libdir=/usr/share/acf/lib/ wwwdir=/usr/share/acf/www/ diff --git a/app/acf_www-controller.lua b/app/acf_www-controller.lua index 017b574..fdabc0b 100644 --- a/app/acf_www-controller.lua +++ b/app/acf_www-controller.lua @@ -252,9 +252,7 @@ mvc.on_load = function (self, parent) parent_exception_handler = parent.exception_handler -- this sets the package path for us and our children - for p in string.gmatch(self.conf.libdir, "[^,]+") do - package.path= p .. "?.lua;" .. package.path - end + package.path = string.gsub(self.conf.libdir, ",", "/?.lua;") .. "/?.lua;" .. package.path sessionlib=require ("session") -- cgit v1.2.3