diff options
| author | Rob Mensching <rob@firegiant.com> | 2021-03-14 07:38:48 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2021-03-14 07:47:48 -0700 |
| commit | 3ccd5e439da4296d6f2b66ce47075ab20d039676 (patch) | |
| tree | b5546552613b869367d09f444492a0bbcfadcfe0 /src/WixToolset.Core.WindowsInstaller/Bind/AttachPatchTransformsCommand.cs | |
| parent | 574785ab1421c9b67336c13ade5c2263e665ca07 (diff) | |
| download | wix-3ccd5e439da4296d6f2b66ce47075ab20d039676.tar.gz wix-3ccd5e439da4296d6f2b66ce47075ab20d039676.tar.bz2 wix-3ccd5e439da4296d6f2b66ce47075ab20d039676.zip | |
Minimize public surface area of Core
Fixes wixtoolset/issues#6374
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Bind/AttachPatchTransformsCommand.cs')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Bind/AttachPatchTransformsCommand.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/AttachPatchTransformsCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/AttachPatchTransformsCommand.cs index 2249faf8..b2052b90 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/AttachPatchTransformsCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/AttachPatchTransformsCommand.cs | |||
| @@ -55,16 +55,19 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 55 | 55 | ||
| 56 | private readonly TableDefinitionCollection tableDefinitions; | 56 | private readonly TableDefinitionCollection tableDefinitions; |
| 57 | 57 | ||
| 58 | public AttachPatchTransformsCommand(IMessaging messaging, Intermediate intermediate, IEnumerable<PatchTransform> transforms) | 58 | public AttachPatchTransformsCommand(IMessaging messaging, IBackendHelper backendHelper, Intermediate intermediate, IEnumerable<PatchTransform> transforms) |
| 59 | { | 59 | { |
| 60 | this.tableDefinitions = new TableDefinitionCollection(WindowsInstallerTableDefinitions.All); | 60 | this.tableDefinitions = new TableDefinitionCollection(WindowsInstallerTableDefinitions.All); |
| 61 | this.Messaging = messaging; | 61 | this.Messaging = messaging; |
| 62 | this.BackendHelper = backendHelper; | ||
| 62 | this.Intermediate = intermediate; | 63 | this.Intermediate = intermediate; |
| 63 | this.Transforms = transforms; | 64 | this.Transforms = transforms; |
| 64 | } | 65 | } |
| 65 | 66 | ||
| 66 | private IMessaging Messaging { get; } | 67 | private IMessaging Messaging { get; } |
| 67 | 68 | ||
| 69 | private IBackendHelper BackendHelper { get; } | ||
| 70 | |||
| 68 | private Intermediate Intermediate { get; } | 71 | private Intermediate Intermediate { get; } |
| 69 | 72 | ||
| 70 | private IEnumerable<PatchTransform> Transforms { get; } | 73 | private IEnumerable<PatchTransform> Transforms { get; } |
| @@ -797,7 +800,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 797 | if (!deletedComponent.ContainsKey(componentId)) | 800 | if (!deletedComponent.ContainsKey(componentId)) |
| 798 | { | 801 | { |
| 799 | var foundRemoveFileEntry = false; | 802 | var foundRemoveFileEntry = false; |
| 800 | var filename = Common.GetName(row.FieldAsString(2), false, true); | 803 | var filename = this.BackendHelper.GetMsiFileName(row.FieldAsString(2), false, true); |
| 801 | 804 | ||
| 802 | if (transform.TryGetTable("RemoveFile", out var removeFileTable)) | 805 | if (transform.TryGetTable("RemoveFile", out var removeFileTable)) |
| 803 | { | 806 | { |
| @@ -813,7 +816,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 813 | // Check if there is a RemoveFile entry for this file | 816 | // Check if there is a RemoveFile entry for this file |
| 814 | if (null != removeFileRow[2]) | 817 | if (null != removeFileRow[2]) |
| 815 | { | 818 | { |
| 816 | var removeFileName = Common.GetName(removeFileRow.FieldAsString(2), false, true); | 819 | var removeFileName = this.BackendHelper.GetMsiFileName(removeFileRow.FieldAsString(2), false, true); |
| 817 | 820 | ||
| 818 | // Convert the MSI format for a wildcard string to Regex format. | 821 | // Convert the MSI format for a wildcard string to Regex format. |
| 819 | removeFileName = removeFileName.Replace('.', '|').Replace('?', '.').Replace("*", ".*").Replace("|", "\\."); | 822 | removeFileName = removeFileName.Replace('.', '|').Replace('?', '.').Replace("*", ".*").Replace("|", "\\."); |
