Skip to content

On Windows use RemoveDirectoryW to delete empty directory before renaming directory to it #223

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 1 commit into from
Oct 28, 2024

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Oct 25, 2024

I don't know why but using llvm::sys::fs::remove_directories to delete the directories sometimes does not actually delete the directory, which causes MoveFileW to fail because the destination already exists. I don't see this issue when using RemoveDirectoryW

…naming directory to it

I don't know why but using `llvm::sys::fs::remove_directories` to delete the directories sometimes does not actually delete the directory, which causes `MoveFileW` to fail because the destination already exists. I don't see this issue when using `RemoveDirectoryW`
@ahoppen ahoppen requested a review from bnbarham as a code owner October 25, 2024 15:50
@ahoppen
Copy link
Member Author

ahoppen commented Oct 25, 2024

@swift-ci Please test

@ahoppen ahoppen merged commit fbbde36 into swiftlang:main Oct 28, 2024
3 checks passed
@ahoppen ahoppen deleted the windows-dir-rename branch October 28, 2024 22:41
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.

2 participants