Skip to content

Commit 77144c3

Browse files
committed
fix(dpi): making sure that target directory exists
1 parent f7f2536 commit 77144c3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/ns-dpi/files/dpi-nft

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ def generate_dpi():
3535
)
3636
# save to nftables directory table-pre, only if the file is changed
3737
file_path = '/usr/share/nftables.d/table-pre/dpi_blocks.nft'
38+
# ensure directory exists
39+
os.makedirs(os.path.dirname(file_path), exist_ok=True)
3840
current = None
3941
if os.path.exists(file_path):
4042
with open(file_path, 'r') as f:

0 commit comments

Comments
 (0)