mirror of
https://github.com/9001/copyparty.git
synced 2026-01-13 00:02:40 -07: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:
parent
fa32e15958
commit
511dc01615
|
|
@ -1833,6 +1833,14 @@ class HttpCli(object):
|
||||||
):
|
):
|
||||||
bfree, btot, _ = get_df(vn.realpath, False)
|
bfree, btot, _ = get_df(vn.realpath, False)
|
||||||
if btot:
|
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 = {
|
df = {
|
||||||
"quota-available-bytes": str(bfree),
|
"quota-available-bytes": str(bfree),
|
||||||
"quota-used-bytes": str(btot - bfree),
|
"quota-used-bytes": str(btot - bfree),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue