summaryrefslogtreecommitdiffhomepage
path: root/libs/cbi
diff options
context:
space:
mode:
Diffstat (limited to 'libs/cbi')
-rw-r--r--libs/cbi/luasrc/cbi.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua
index 6eeef0f78..e687164c2 100644
--- a/libs/cbi/luasrc/cbi.lua
+++ b/libs/cbi/luasrc/cbi.lua
@@ -62,12 +62,10 @@ function load(cbimap, ...)
local cbidir = luci.util.libpath() .. "/model/cbi/"
local func, err
- if fs.access(cbimap) then
- func, err = loadfile(cbimap)
- elseif fs.access(cbidir..cbimap..".lua") then
+ if fs.access(cbidir..cbimap..".lua") then
func, err = loadfile(cbidir..cbimap..".lua")
- elseif fs.access(cbidir..cbimap..".lua.gz") then
- func, err = loadfile(cbidir..cbimap..".lua.gz")
+ elseif fs.access(cbimap) then
+ func, err = loadfile(cbimap)
else
func, err = nil, "Model '" .. cbimap .. "' not found!"
end