mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
u2c: don't get stuck at fifos and such
This commit is contained in:
parent
a2e037d6af
commit
cba1878bb2
|
@ -581,13 +581,17 @@ def walkdir(err, top, excl, seen):
|
||||||
for ap, inf in sorted(statdir(err, top)):
|
for ap, inf in sorted(statdir(err, top)):
|
||||||
if excl.match(ap):
|
if excl.match(ap):
|
||||||
continue
|
continue
|
||||||
yield ap, inf
|
|
||||||
if stat.S_ISDIR(inf.st_mode):
|
if stat.S_ISDIR(inf.st_mode):
|
||||||
|
yield ap, inf
|
||||||
try:
|
try:
|
||||||
for x in walkdir(err, ap, excl, seen):
|
for x in walkdir(err, ap, excl, seen):
|
||||||
yield x
|
yield x
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
err.append((ap, str(ex)))
|
err.append((ap, str(ex)))
|
||||||
|
elif stat.S_ISREG(inf.st_mode):
|
||||||
|
yield ap, inf
|
||||||
|
else:
|
||||||
|
err.append((ap, "irregular filetype 0%o" % (inf.st_mode,)))
|
||||||
|
|
||||||
|
|
||||||
def walkdirs(err, tops, excl):
|
def walkdirs(err, tops, excl):
|
||||||
|
|
Loading…
Reference in a new issue