From 79097bb43c05d0a44e0293bcffd0998185d5563d Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 19 Oct 2021 01:04:21 +0200 Subject: [PATCH] optimize rmtree on windows --- copyparty/util.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/copyparty/util.py b/copyparty/util.py index 95312d3f..3a9e86f8 100644 --- a/copyparty/util.py +++ b/copyparty/util.py @@ -1191,6 +1191,9 @@ def sendfile_kern(lower, upper, f, s): def statdir(logger, scandir, lstat, top): + if lstat and ANYWIN: + lstat = False + if lstat and not os.supports_follow_symlinks: scandir = False