diff options
author | Jo-Philipp Wich <jo@mein.io> | 2022-10-25 12:50:37 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2022-10-25 12:50:37 +0200 |
commit | adc4ca65bccfa6265bdd5e1ae70aabae09bd617b (patch) | |
tree | 2b343c9589677fda7d8c1a79ed5fd5b2ee710a45 | |
parent | 639e7faa1ad25b0bc2ffd5bfec79c2b9d95a50ee (diff) |
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>
-rw-r--r-- | modules/luci-base/ucode/dispatcher.uc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/luci-base/ucode/dispatcher.uc b/modules/luci-base/ucode/dispatcher.uc index 7ff8d49c12..50c1a7d0f2 100644 --- a/modules/luci-base/ucode/dispatcher.uc +++ b/modules/luci-base/ucode/dispatcher.uc @@ -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; |