Thanks to visit codestin.com
Credit goes to github.com

Skip to content

GH-89727: Fix shutil.rmtree() recursion error on deep trees #119808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jun 1, 2024
Prev Previous commit
Skip os.unlink() if os.DirEntry.is_dir() raises FileNotFoundError
  • Loading branch information
barneygale committed May 31, 2024
commit a53e4736d6ce28cc11e68b63b69fec3951831dcb
2 changes: 2 additions & 0 deletions Lib/shutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,8 @@ def _rmtree_safe_fd(stack, onexc):
# Traverse into sub-directory.
stack.append((os.lstat, topfd, fullname, entry))
continue
except FileNotFoundError:
continue
except OSError:
pass
try:
Expand Down
Loading