mirror of
https://github.com/9001/copyparty.git
synced 2025-10-03 09:49:29 +02:00
bubble OS-filesystem errors to client
send a 500 or 404 if a folder is inaccessible or does not exist previously it would return an empty directory listing instead
This commit is contained in:
parent
71d9e010d9
commit
119e88d87b
9 changed files with 27 additions and 9 deletions
|
@ -1142,7 +1142,10 @@ class Ctl(object):
|
|||
|
||||
if self.ar.drd:
|
||||
dp = os.path.join(top, rd)
|
||||
lnodes = set(os.listdir(dp))
|
||||
try:
|
||||
lnodes = set(os.listdir(dp))
|
||||
except:
|
||||
lnodes = list(ls) # fs eio; don't delete
|
||||
if ptn:
|
||||
zs = dp.replace(sep, b"/").rstrip(b"/") + b"/"
|
||||
zls = [zs + x for x in lnodes]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue