aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.WindowsInstaller/Bind/CabinetResolver.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2018-08-11 01:06:40 -0700
committerRob Mensching <rob@firegiant.com>2018-08-11 01:06:40 -0700
commit2a27f9032aa115bc2f88d9be695d9b049db1a894 (patch)
tree7882bd4c94da118a6fc655a3c22e1dd0cf3b60e1 /src/WixToolset.Core.WindowsInstaller/Bind/CabinetResolver.cs
parentb54516035b4ebbfbd8899b26de501bfa13f53e8b (diff)
downloadwix-2a27f9032aa115bc2f88d9be695d9b049db1a894.tar.gz
wix-2a27f9032aa115bc2f88d9be695d9b049db1a894.tar.bz2
wix-2a27f9032aa115bc2f88d9be695d9b049db1a894.zip
Track files to enable clean builds in MSBuild
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/CabinetResolver.cs')
-rw-r--r--src/WixToolset.Core.WindowsInstaller/Bind/CabinetResolver.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/CabinetResolver.cs b/src/WixToolset.Core.WindowsInstaller/Bind/CabinetResolver.cs
index 759fa586..541dacf8 100644
--- a/src/WixToolset.Core.WindowsInstaller/Bind/CabinetResolver.cs
+++ b/src/WixToolset.Core.WindowsInstaller/Bind/CabinetResolver.cs
@@ -48,7 +48,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
48 // to be built to and check if there is a cabinet that can be reused. 48 // to be built to and check if there is a cabinet that can be reused.
49 if (!String.IsNullOrEmpty(this.CabCachePath)) 49 if (!String.IsNullOrEmpty(this.CabCachePath))
50 { 50 {
51 string cabinetName = Path.GetFileName(cabinetPath); 51 var cabinetName = Path.GetFileName(cabinetPath);
52 resolved.Path = Path.Combine(this.CabCachePath, cabinetName); 52 resolved.Path = Path.Combine(this.CabCachePath, cabinetName);
53 53
54 if (CheckFileExists(resolved.Path)) 54 if (CheckFileExists(resolved.Path))
@@ -57,10 +57,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind
57 // 1. any files are added or removed 57 // 1. any files are added or removed
58 // 2. order of files changed or names changed 58 // 2. order of files changed or names changed
59 // 3. modified time changed 59 // 3. modified time changed
60 bool cabinetValid = true; 60 var cabinetValid = true;
61 61
62 var cabinet = new Cabinet(resolved.Path); 62 var cabinet = new Cabinet(resolved.Path);
63 List<CabinetFileInfo> fileList = cabinet.Enumerate(); 63 var fileList = cabinet.Enumerate();
64 64
65 if (filesWithPath.Count() != fileList.Count) 65 if (filesWithPath.Count() != fileList.Count)
66 { 66 {
@@ -68,16 +68,16 @@ namespace WixToolset.Core.WindowsInstaller.Bind
68 } 68 }
69 else 69 else
70 { 70 {
71 int i = 0; 71 var i = 0;
72 foreach (BindFileWithPath file in filesWithPath) 72 foreach (var file in filesWithPath)
73 { 73 {
74 // First check that the file identifiers match because that is quick and easy. 74 // First check that the file identifiers match because that is quick and easy.
75 CabinetFileInfo cabFileInfo = fileList[i]; 75 var cabFileInfo = fileList[i];
76 cabinetValid = (cabFileInfo.FileId == file.Id); 76 cabinetValid = (cabFileInfo.FileId == file.Id);
77 if (cabinetValid) 77 if (cabinetValid)
78 { 78 {
79 // Still valid so ensure the file sizes are the same. 79 // Still valid so ensure the file sizes are the same.
80 FileInfo fileInfo = new FileInfo(file.Path); 80 var fileInfo = new FileInfo(file.Path);
81 cabinetValid = (cabFileInfo.Size == fileInfo.Length); 81 cabinetValid = (cabFileInfo.Size == fileInfo.Length);
82 if (cabinetValid) 82 if (cabinetValid)
83 { 83 {