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

make RenameFile() on Windows also replace the file #2060

Merged
merged 2 commits into from
May 5, 2024

Conversation

rtldg
Copy link
Contributor

@rtldg rtldg commented Oct 9, 2023

RenameFile on linux uses rename() which will replace the destination file if it exists. MoveFileA doesn't replace so this is swapping it with MoveFileExA+MOVEFILE_REPLACE_EXISTING which will replace the destination.

@rtldg
Copy link
Contributor Author

rtldg commented Oct 9, 2023

accidentally made the pr on this repo instead my fork when trying to test github actions building the binary for testing. if the binary works correctly though then I'll keep the pr open

edit: it sucks that actions don't cache generated artifacts. that would be very useful if they did. wink wink nudge nudge

BoomShotKapow added a commit to BoomShotKapow/shavit-myreplay that referenced this pull request Oct 9, 2023
Copy link
Member

@psychonic psychonic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the available flags, I think we should probably add MOVEFILE_COPY_ALLOWED as well

@rtldg
Copy link
Contributor Author

rtldg commented May 5, 2024

Looking at the available flags, I think we should probably add MOVEFILE_COPY_ALLOWED as well

Good idea. Added it.

Copy link
Member

@psychonic psychonic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@psychonic psychonic merged commit 908ffdb into alliedmodders:master May 5, 2024
4 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
Development

Successfully merging this pull request may close these issues.

2 participants