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

Skip to content

Tolerate concurrent removal during temporary folder cleanup #1851

Description

@betacatsling

delete_folder checks that a directory exists, then calls os.listdir outside its retry handler. Another cleaner can remove that directory before listdir or rmtree, causing an otherwise successful cleanup to raise FileNotFoundError.

Reproduced on Linux / Python 3.12 against upstream commit 677d669ac48d878dbbb633f70c71995a294e2aa5. A deterministic regression and focused fix are prepared.

This report was prepared with AI assistance.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions