mirror of
https://github.com/openwrt/luci.git
synced 2025-12-26 11:16:38 +04:00
luci-base: dispatcher.uc: reintroduce support for 'absent' fs depends
The ability to require certain paths to be absent for a menu entry to show up was lost during the ucode conversion. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
@@ -183,6 +183,10 @@ function check_fs_depends(spec) {
|
||||
if (fstat?.type != 'file')
|
||||
return false;
|
||||
}
|
||||
else if (kind == 'absent') {
|
||||
if (stat(path) != null)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user