mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 17:12:13 -06:00
pipe: add volflag to disable
This commit is contained in:
parent
897ffbbbd0
commit
c06126cc9d
|
@ -1091,6 +1091,7 @@ def add_optouts(ap):
|
|||
ap2.add_argument("--no-zip", action="store_true", help="disable download as zip/tar")
|
||||
ap2.add_argument("--no-tarcmp", action="store_true", help="disable download as compressed tar (?tar=gz, ?tar=bz2, ?tar=xz, ?tar=gz:9, ...)")
|
||||
ap2.add_argument("--no-lifetime", action="store_true", help="do not allow clients (or server config) to schedule an upload to be deleted after a given time")
|
||||
ap2.add_argument("--no-pipe", action="store_true", help="disable race-the-beam (lockstep download of files which are currently being uploaded) (volflag=nopipe)")
|
||||
ap2.add_argument("--no-db-ip", action="store_true", help="do not write uploader IPs into the database")
|
||||
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ def vf_bmap() -> dict[str, str]:
|
|||
"no_dedup": "copydupes",
|
||||
"no_dupe": "nodupe",
|
||||
"no_forget": "noforget",
|
||||
"no_pipe": "nopipe",
|
||||
"no_robots": "norobots",
|
||||
"no_thumb": "dthumb",
|
||||
"no_vthumb": "dvthumb",
|
||||
|
|
|
@ -2936,12 +2936,12 @@ class HttpCli(object):
|
|||
logtail = ""
|
||||
|
||||
if ptop is not None:
|
||||
try:
|
||||
dp, fn = os.path.split(req_path)
|
||||
tnam = fn + ".PARTIAL"
|
||||
if self.args.dotpart:
|
||||
tnam = "." + tnam
|
||||
ap_data = os.path.join(dp, tnam)
|
||||
try:
|
||||
st_data = bos.stat(ap_data)
|
||||
if not st_data.st_size:
|
||||
raise Exception("partial is empty")
|
||||
|
@ -4179,7 +4179,9 @@ class HttpCli(object):
|
|||
):
|
||||
return self.tx_md(vn, abspath)
|
||||
|
||||
return self.tx_file(abspath, None if st.st_size else vn.realpath)
|
||||
return self.tx_file(
|
||||
abspath, None if st.st_size or "nopipe" in vn.flags else vn.realpath
|
||||
)
|
||||
|
||||
elif is_dir and not self.can_read:
|
||||
if self._use_dirkey(abspath):
|
||||
|
|
Loading…
Reference in a new issue