mirror of
https://github.com/9001/copyparty.git
synced 2026-04-13 15:42:36 -06:00
authsrv: fix dive() leaf-level file counting
This commit is contained in:
parent
7c60adc69c
commit
ef99b8ef69
|
|
@ -316,7 +316,22 @@ class Lim(object):
|
|||
|
||||
if not lvs:
|
||||
# at leaf level
|
||||
return None if len(items) >= self.rotn else ""
|
||||
nfiles = 0
|
||||
for name in items:
|
||||
if name.endswith(".PARTIAL"):
|
||||
continue
|
||||
|
||||
ap = os.path.join(path, name)
|
||||
try:
|
||||
is_dir = stat.S_ISDIR(bos.stat(ap).st_mode)
|
||||
except:
|
||||
nfiles += 1
|
||||
continue
|
||||
|
||||
if not is_dir:
|
||||
nfiles += 1
|
||||
|
||||
return None if nfiles >= self.rotn else ""
|
||||
|
||||
dirs = [int(x) for x in items if x and all(y in "1234567890" for y in x)]
|
||||
dirs.sort()
|
||||
|
|
|
|||
Loading…
Reference in a new issue