diff options
| author | Jo-Philipp Wich | 2022-09-01 09:33:48 +0000 |
|---|---|---|
| committer | Jo-Philipp Wich | 2022-09-01 09:33:48 +0000 |
| commit | a540f6d5373217e60febd2d0bc0f585981e67917 (patch) | |
| tree | 68f073080400f8677c74a6bc5acf195f5508b3ab | |
| parent | 695e8211d1d02a2274f4bbf51c9017d4b29b653e (diff) | |
| download | firewall4-a540f6d5373217e60febd2d0bc0f585981e67917.tar.gz | |
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 <jo@mein.io>
| -rw-r--r-- | root/usr/share/ucode/fw4.uc | 2 |
1 files changed, 1 insertions, 1 deletions
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 }); } |