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 file system error 17 (EEXIST) on linux and macos #4286

Merged
merged 1 commit into from
May 28, 2024

Conversation

sigurdm
Copy link
Contributor

@sigurdm sigurdm commented May 27, 2024

Reading the linux man page for rename(2) again, it is clear that the file system can respond with either error-code EEXISTS or ENOTEMPTY when the destination directory exists and is not empty. We were only catching one of these.

Fixes #4285

I'm not so sure about macOS. There is also an EEXIST. Man page says:

     [EEXIST]           flags has RENAME_EXCL set but new already exists.

I think that dart:io on mac is not setting any flags in its rename call, but I'm assuming there is very little harm.

@sigurdm sigurdm merged commit d165b5f into dart-lang:master May 28, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants