mirror of
https://github.com/9001/copyparty.git
synced 2026-04-19 02:22:37 -06:00
bup: skip lim for nullwrite/nameless (perf)
This commit is contained in:
parent
6fb1287e7f
commit
a997455b5a
|
|
@ -3828,6 +3828,14 @@ class HttpCli(object):
|
|||
finally:
|
||||
f.close()
|
||||
|
||||
self.conn.nbyte += sz
|
||||
if not abspath:
|
||||
files.append(
|
||||
(sz, sha_hex, sha_b64, p_file or "(discarded)", fname, "")
|
||||
)
|
||||
tabspath = ""
|
||||
continue
|
||||
|
||||
if lim:
|
||||
lim.nup(self.ip)
|
||||
lim.bup(self.ip, sz)
|
||||
|
|
@ -3838,20 +3846,11 @@ class HttpCli(object):
|
|||
lim.chk_bup(self.ip)
|
||||
lim.chk_nup(self.ip)
|
||||
except:
|
||||
if not nullwrite:
|
||||
wunlink(self.log, tabspath, vfs.flags)
|
||||
wunlink(self.log, abspath, vfs.flags)
|
||||
wunlink(self.log, tabspath, vfs.flags)
|
||||
wunlink(self.log, abspath, vfs.flags)
|
||||
fname = os.devnull
|
||||
raise
|
||||
|
||||
self.conn.nbyte += sz
|
||||
if not abspath:
|
||||
files.append(
|
||||
(sz, sha_hex, sha_b64, p_file or "(discarded)", fname, "")
|
||||
)
|
||||
tabspath = ""
|
||||
continue
|
||||
|
||||
atomic_move(self.log, tabspath, abspath, vfs.flags)
|
||||
tabspath = ""
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue