Explorar o código

gluon-config-mode-core: don't throw error when no config mode modules are installed

The expert mode can still be useful without any cohfig mode modules.
Matthias Schiffer %!s(int64=8) %!d(string=hai) anos
pai
achega
12f9df7e86

+ 5 - 2
package/gluon-config-mode-core/files/usr/lib/lua/luci/model/cbi/gluon-config-mode/wizard.lua

@@ -6,9 +6,12 @@ local util = require "nixio.util"
 local f, s
 
 local wizard = {}
-local files = util.consume(fs.dir(wizard_dir))
+local files = {}
 
-table.sort(files)
+if fs.access(wizard_dir) then
+  files = util.consume(fs.dir(wizard_dir))
+  table.sort(files)
+end
 
 for _, entry in ipairs(files) do
   if entry:sub(1, 1) ~= '.' then