mirror of
https://github.com/9001/copyparty.git
synced 2025-12-27 07:54:13 -05:00
webdav: reply with vmaxb as disk size (#1120)
if vmaxb smaller than available disk space, then reply with vmaxb instead
This commit is contained in:
@@ -1833,6 +1833,14 @@ class HttpCli(object):
|
||||
):
|
||||
bfree, btot, _ = get_df(vn.realpath, False)
|
||||
if btot:
|
||||
if "vmaxb" in vn.flags:
|
||||
try:
|
||||
zi, _ = self.conn.hsrv.broker.ask(
|
||||
"up2k.get_volsizes", [vn.realpath]
|
||||
).get()[0]
|
||||
bfree = min(bfree, max(0, vn.lim.vbmax - zi))
|
||||
except:
|
||||
pass
|
||||
df = {
|
||||
"quota-available-bytes": str(bfree),
|
||||
"quota-used-bytes": str(btot - bfree),
|
||||
|
||||
Reference in New Issue
Block a user