aboutsummaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
Diffstat (limited to 'devtools')
-rw-r--r--devtools/create_project/scripts/revision.vbs14
1 files changed, 9 insertions, 5 deletions
diff --git a/devtools/create_project/scripts/revision.vbs b/devtools/create_project/scripts/revision.vbs
index 47eff423b2..7f0655dae1 100644
--- a/devtools/create_project/scripts/revision.vbs
+++ b/devtools/create_project/scripts/revision.vbs
@@ -489,12 +489,16 @@ Sub CompareFileAndReplace(src_filename, dst_filename)
Set file = FSO.OpenTextFile(src_filename, 1, 0, 0)
src_data = file.ReadAll
file.Close
- 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 different, overwrite the destination
+ If Not FSO.FileExists(dst_filename) Then
FSO.CopyFile src_filename, dst_filename, True
+ Else
+ 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 different, overwrite the destination
+ FSO.CopyFile src_filename, dst_filename, True
+ End If
End If
' Remove temporary source
FSO.DeleteFile src_filename