Skip to content
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

Handle race condition caused by AppleDouble files when removing a directory tree #1716

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cfxegbert
Copy link
Contributor

Handle race condition caused by AppleDouble files when removing a directory tree

Handle race condition caused by AppleDouble files.
@cfxegbert cfxegbert requested a review from a team as a code owner April 10, 2024 00:16
@cfxegbert cfxegbert changed the title Signed-off-by: Robert Minsk <robertminsk@yahoo.com> Handle race condition caused by AppleDouble files when removing a directory tree Apr 10, 2024
@JeanChristopheMorinPerso
Copy link
Member

Hi @cfxegbert, can you explain a little bit more what this is about and also describe the problem more in-depth please?

When creating pull requests (or issues), please provide as much details as possible.

@cfxegbert
Copy link
Contributor Author

Sorry about that. From a comment in the code.

On Mac OSX files may consist of a data fork and a resource fork. On a foreign file system these files are stored as AppleDouble files. The data fork is stored as "filename" and the resource fork is stored as "._filename". When the data fork is removed the corresponding resource fork is also removed. This results in a FileNotFoundError when shutil.rmtree tries to remove the resource fork. This is addressed in Python 13.3 for another situation not related to AppleDouble files python/cpython#14064

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.

None yet

2 participants