[Scummvm-git-logs] scummvm branch-2-1 -> d09d6c754e9b1fe6e42e2c3e069b1f63f665d4ee

lephilousophe lephilousophe at users.noreply.github.com
Wed Sep 25 18:25:32 CEST 2019


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
d09d6c754e MSVC: Fix MoveFile error when destination exists


Commit: d09d6c754e9b1fe6e42e2c3e069b1f63f665d4ee
    https://github.com/scummvm/scummvm/commit/d09d6c754e9b1fe6e42e2c3e069b1f63f665d4ee
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2019-09-25T18:25:02+02:00

Commit Message:
MSVC: Fix MoveFile error when destination exists

Use CopyFile with overwrite flag instead

Changed paths:
    devtools/create_project/scripts/revision.vbs


diff --git a/devtools/create_project/scripts/revision.vbs b/devtools/create_project/scripts/revision.vbs
index b8c2d61..47eff42 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





More information about the Scummvm-git-logs mailing list