filesystem: in recursive mtime, check only files that exist (#32175)
* filesystem: use lstat in recursive mtime When a `develop` path contains a dead symlink, the `os.stat` in the recursive `mtime` determination trips up over it. Closes #32165.
This commit is contained in:
parent
7e1890772c
commit
8f34a3ac5c
@ -1293,7 +1293,7 @@ def last_modification_time_recursive(path):
|
||||
path = os.path.abspath(path)
|
||||
times = [os.stat(path).st_mtime]
|
||||
times.extend(
|
||||
os.stat(os.path.join(root, name)).st_mtime
|
||||
os.lstat(os.path.join(root, name)).st_mtime
|
||||
for root, dirs, files in os.walk(path)
|
||||
for name in dirs + files
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user