diff options
author | Le Philousophe | 2019-09-25 18:23:34 +0200 |
---|---|---|
committer | Le Philousophe | 2019-09-25 18:23:34 +0200 |
commit | c893c5a60b8298aa99ae1a47dea51c6f04c419bc (patch) | |
tree | 1530f63b57d897eca9d3867ff798e6add82d0fed /devtools/create_project/scripts | |
parent | 66b8beede83a257fde37a9f989521de9443f0be5 (diff) | |
download | scummvm-rg350-c893c5a60b8298aa99ae1a47dea51c6f04c419bc.tar.gz scummvm-rg350-c893c5a60b8298aa99ae1a47dea51c6f04c419bc.tar.bz2 scummvm-rg350-c893c5a60b8298aa99ae1a47dea51c6f04c419bc.zip |
MSVC: Fix MoveFile error when destination exists
Use CopyFile with overwrite flag instead
Diffstat (limited to 'devtools/create_project/scripts')
-rw-r--r-- | devtools/create_project/scripts/revision.vbs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/devtools/create_project/scripts/revision.vbs b/devtools/create_project/scripts/revision.vbs index b8c2d6121f..47eff423b2 100644 --- a/devtools/create_project/scripts/revision.vbs +++ b/devtools/create_project/scripts/revision.vbs @@ -492,11 +492,10 @@ Sub CompareFileAndReplace(src_filename, dst_filename) Set file = FSO.OpenTextFile(dst_filename, 1, 0, 0) dst_data = file.ReadAll file.Close - If StrComp(src_data, dst_data, vbBinaryCompare) = 0 Then - ' Files are the same, just remove the source - FSO.DeleteFile src_filename - Else + If StrComp(src_data, dst_data, vbBinaryCompare) <> 0 Then ' Files are different, overwrite the destination - FSO.MoveFile src_filename, dst_filename + FSO.CopyFile src_filename, dst_filename, True End If + ' Remove temporary source + FSO.DeleteFile src_filename End Sub |