tftpd: filter directory listings using .hidden

This commit is contained in:
NecRaul 2026-03-08 11:46:14 +04:00
parent 9b2cfd3f12
commit 4f5df0b7a1
No known key found for this signature in database

View file

@ -42,6 +42,7 @@ from .util import (
Daemon, Daemon,
ODict, ODict,
exclude_dotfiles, exclude_dotfiles,
load_dothidden,
min_ex, min_ex,
runhook, runhook,
set_fperms, set_fperms,
@ -318,7 +319,8 @@ class Tftpd(object):
ls = virs + reals ls = virs + reals
if "*" not in vn.axs.udot: if "*" not in vn.axs.udot:
names = set(exclude_dotfiles([x[2] for x in ls])) dothidden = load_dothidden(fsroot)
names = set(exclude_dotfiles([x[2] for x in ls], dothidden))
ls = [x for x in ls if x[2] in names] ls = [x for x in ls if x[2] in names]
try: try: