diff --git a/copyparty/util.py b/copyparty/util.py index 29e1efa4..f9883afa 100644 --- a/copyparty/util.py +++ b/copyparty/util.py @@ -1014,6 +1014,7 @@ def sendfile_kern(lower, upper, f, s): def statdir(logger, scandir, lstat, top): + lstat = lstat and os.supports_follow_symlinks try: btop = fsenc(top) if scandir and hasattr(os, "scandir"):