Skip to content

Clean temporary files before mounted empty directories during cleanup#133

Open
k3a wants to merge 1 commit intoanthropic-experimental:mainfrom
k3a:fix-cleanup-order
Open

Clean temporary files before mounted empty directories during cleanup#133
k3a wants to merge 1 commit intoanthropic-experimental:mainfrom
k3a:fix-cleanup-order

Conversation

@k3a
Copy link
Copy Markdown

@k3a k3a commented Feb 13, 2026

Some paths require an empty directory to be mounted. This is done by Fix 2 and creates an empty directory in the host. Then a /dev/null file may be mounted into that directory.

During cleanup, a directory is sometimes unsucessfully attempted to be cleaned before cleaning that empty file inside.

Sorting mountpoints from the longest to the shortest ensures temporary files are cleaned before an attempt to clean a directory.

Some paths require an empty directory to be mounted.
This is done by Fix 2 and creates an empty directory in the host.
Then a /dev/null file may be mounted into that directory.

During cleanup, a directory is sometimes unsucessfully attempted to be cleaned before cleaning that empty file inside.

Sorting mountpoints from the longest to the shortest ensures temporary files are cleaned before an attempt to clean a directory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant