dodge a bullet on centos7

This commit is contained in:
ed 2021-07-27 00:28:40 +02:00
parent 19f23c686e
commit a362ee2246

View file

@ -1034,11 +1034,13 @@ def sendfile_kern(lower, upper, f, s):
def statdir(logger, scandir, lstat, top):
if lstat and not os.supports_follow_symlinks:
scandir = False
try:
btop = fsenc(top)
if scandir and hasattr(os, "scandir"):
src = "scandir"
lstat = lstat and os.supports_follow_symlinks
with os.scandir(btop) as dh:
for fh in dh:
try: