From 57650a218fa71f94e14de88ca682da64892a404a Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 27 Sep 2025 18:44:14 +0000 Subject: [PATCH] use reflinks (not hardlinks) in -ss; closes #858 --- copyparty/__main__.py | 2 +- copyparty/svchub.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/copyparty/__main__.py b/copyparty/__main__.py index 9964ca6a..6dc76f04 100644 --- a/copyparty/__main__.py +++ b/copyparty/__main__.py @@ -1515,7 +1515,7 @@ def add_optouts(ap): def add_safety(ap): ap2 = ap.add_argument_group("safety options") ap2.add_argument("-s", action="count", default=0, help="increase safety: Disable thumbnails / potentially dangerous software (ffmpeg/pillow/vips), hide partial uploads, avoid crawlers.\n └─Alias of\033[32m --dotpart --no-thumb --no-mtag-ff --no-robots --force-js") - ap2.add_argument("-ss", action="store_true", help="further increase safety: Prevent js-injection, accidental move/delete, broken symlinks, webdav requires login, 404 on 403, ban on excessive 404s.\n └─Alias of\033[32m -s --unpost=0 --no-del --no-mv --hardlink --dav-auth --vague-403 -nih") + ap2.add_argument("-ss", action="store_true", help="further increase safety: Prevent js-injection, accidental move/delete, broken symlinks, webdav requires login, 404 on 403, ban on excessive 404s.\n └─Alias of\033[32m -s --unpost=0 --no-del --no-mv --reflink --dav-auth --vague-403 -nih") ap2.add_argument("-sss", action="store_true", help="further increase safety: Enable logging to disk, scan for dangerous symlinks.\n └─Alias of\033[32m -ss --no-dav --no-logues --no-readme -lo=cpp-%%Y-%%m%%d-%%H%%M%%S.txt.xz --ls=**,*,ln,p,r") ap2.add_argument("--ls", metavar="U[,V[,F]]", type=u, default="", help="do a sanity/safety check of all volumes on startup; arguments \033[33mUSER\033[0m,\033[33mVOL\033[0m,\033[33mFLAGS\033[0m (see \033[33m--help-ls\033[0m); example [\033[32m**,*,ln,p,r\033[0m]") ap2.add_argument("--xvol", action="store_true", help="never follow symlinks leaving the volume root, unless the link is into another volume where the user has similar access (volflag=xvol)") diff --git a/copyparty/svchub.py b/copyparty/svchub.py index bec9ee3d..100c9bd8 100644 --- a/copyparty/svchub.py +++ b/copyparty/svchub.py @@ -157,7 +157,7 @@ class SvcHub(object): args.unpost = 0 args.no_del = True args.no_mv = True - args.hardlink = True + args.reflink = True args.dav_auth = True args.vague_403 = True args.nih = True