aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.WindowsInstaller/Bind/FileSystemManager.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2021-03-25 06:02:13 -0700
committerRob Mensching <rob@firegiant.com>2021-03-25 10:04:58 -0700
commitc29c96b72c3ba2fcfa06da54c7fe3750bce4168b (patch)
tree0763b5062509f26c7b2f2d04f045a79391d70945 /src/WixToolset.Core.WindowsInstaller/Bind/FileSystemManager.cs
parent42b570e34f9cfadbf6f6135cd6b55630c13538be (diff)
downloadwix-c29c96b72c3ba2fcfa06da54c7fe3750bce4168b.tar.gz
wix-c29c96b72c3ba2fcfa06da54c7fe3750bce4168b.tar.bz2
wix-c29c96b72c3ba2fcfa06da54c7fe3750bce4168b.zip
Minor CompareFiles optimization when source/target are same path
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/FileSystemManager.cs')
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Bind/FileSystemManager.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/FileSystemManager.cs b/src/WixToolset.Core.WindowsInstaller/Bind/FileSystemManager.cs
index 75477271..fe65ccef 100644
--- a/src/WixToolset.Core.WindowsInstaller/Bind/FileSystemManager.cs
+++ b/src/WixToolset.Core.WindowsInstaller/Bind/FileSystemManager.cs
@@ -2,6 +2,7 @@
2 2
3namespace WixToolset.Core.WindowsInstaller.Bind 3namespace WixToolset.Core.WindowsInstaller.Bind
4{ 4{
5 using System;
5 using System.Collections.Generic; 6 using System.Collections.Generic;
6 using System.IO; 7 using System.IO;
7 using WixToolset.Extensibility; 8 using WixToolset.Extensibility;
@@ -31,6 +32,11 @@ namespace WixToolset.Core.WindowsInstaller.Bind
31 32
32 private static bool BuiltinCompareFiles(string firstPath, string secondPath) 33 private static bool BuiltinCompareFiles(string firstPath, string secondPath)
33 { 34 {
35 if (String.Equals(firstPath, secondPath, StringComparison.OrdinalIgnoreCase))
36 {
37 return true;
38 }
39
34 using (var firstStream = File.OpenRead(firstPath)) 40 using (var firstStream = File.OpenRead(firstPath))
35 using (var secondStream = File.OpenRead(secondPath)) 41 using (var secondStream = File.OpenRead(secondPath))
36 { 42 {