From: Jo-Philipp Wich Date: Thu, 1 Sep 2022 09:33:48 +0000 (+0200) Subject: fw4: fix cosmetic issue with per-ruleset and per-table include paths X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a540f6d5373217e60febd2d0bc0f585981e67917;p=project%2Ffirewall4.git fw4: fix cosmetic issue with per-ruleset and per-table include paths Avoid adding a double slash to the file path, even though it is harmless. Signed-off-by: Jo-Philipp Wich --- diff --git a/root/usr/share/ucode/fw4.uc b/root/usr/share/ucode/fw4.uc index dcb13ad..766290e 100644 --- a/root/usr/share/ucode/fw4.uc +++ b/root/usr/share/ucode/fw4.uc @@ -740,7 +740,7 @@ return { if (this.default_option("auto_includes")) { for (let position in [ 'ruleset-pre', 'ruleset-post', 'table-pre', 'table-post', 'chain-pre', 'chain-post' ]) for (let chain in (position in [ 'chain-pre', 'chain-post' ]) ? fs.lsdir(`/usr/share/nftables.d/${position}`) : [ null ]) - for (let path in fs.glob(`/usr/share/nftables.d/${position}/${chain ?? ''}/*.nft`)) + for (let path in fs.glob(`/usr/share/nftables.d/${position}${chain ? `/${chain}` : ''}/*.nft`)) if (fs.access(path)) this.parse_include({ type: 'nftables', position, chain, path }); }