fix slow boot when a volume root has many files

This commit is contained in:
ed 2026-07-26 16:45:49 +00:00
parent 0f2040c383
commit cdb474c8ec

View file

@ -2870,12 +2870,13 @@ class AuthSrv(object):
continue
try:
bos.makedirs(vol.realpath, vf=vol.flags)
files = os.listdir(vol.realpath)
for fn in files:
for fn, _ in statdir(
self.log_func, not self.args.no_scandir, False, vol.realpath, True
):
fn2 = fn.lower()
if fn == fn2:
fn2 = fn.upper()
if fn == fn2 or fn2 in files:
if fn == fn2:
continue
is_ci = os.path.exists(os.path.join(vol.realpath, fn2))
ccs = "y" if is_ci else "n"