mirror of
https://github.com/9001/copyparty.git
synced 2026-02-21 01:40:39 +10:00
webdav: fix macos-finder connect delay (closes #1242);
if both `quota-available-bytes` and `quotaused` are ignored (not even returned as 404), then macos Finder is able to connect instantly, avoiding this longstanding bug in macos the presence of `quotaused` is the trigger for this logic, which is a property apple invented and only apple uses, meaning we can safely break the webdav spec as required in this case thx @freddyheppell for the observation
This commit is contained in:
@@ -1833,7 +1833,9 @@ class HttpCli(object):
|
||||
|
||||
zi = (
|
||||
vn.flags["du_iwho"]
|
||||
if vn.realpath and "quota-available-bytes" in props
|
||||
if vn.realpath
|
||||
and "quota-available-bytes" in props
|
||||
and "quotaused" not in props # macos finder; ingnore it
|
||||
else 0
|
||||
)
|
||||
if zi and (
|
||||
@@ -1864,10 +1866,6 @@ class HttpCli(object):
|
||||
"quota-available-bytes": str(bfree),
|
||||
"quota-used-bytes": str(btot - bfree),
|
||||
}
|
||||
if "quotaused" in props: # macos finder crazytalk
|
||||
df["quotaused"] = df["quota-used-bytes"]
|
||||
if "quota" in props:
|
||||
df["quota"] = df["quota-available-bytes"] # idk, makes it happy
|
||||
else:
|
||||
df = {}
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user