sourcemod icon indicating copy to clipboard operation
sourcemod copied to clipboard

make RenameFile() on Windows also replace the file

Open rtldg opened this issue 2 years ago • 1 comments

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 avatar Oct 09 '23 02:10 rtldg

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

rtldg avatar Oct 09 '23 02:10 rtldg

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

Good idea. Added it.

rtldg avatar May 05 '24 22:05 rtldg