From bf9daf7547175f7a17b949feaeaa9f3cac388073 Mon Sep 17 00:00:00 2001 From: Rob Mensching <rob@firegiant.com> Date: Tue, 16 Mar 2021 14:50:48 -0700 Subject: Migrate ResetAcls to Core.Native from Core --- src/WixToolset.Core/Bind/TransferFilesCommand.cs | 13 +++---------- src/WixToolset.Core/WixToolset.Core.csproj | 1 - 2 files changed, 3 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/WixToolset.Core/Bind/TransferFilesCommand.cs b/src/WixToolset.Core/Bind/TransferFilesCommand.cs index 9c104187..51d5a744 100644 --- a/src/WixToolset.Core/Bind/TransferFilesCommand.cs +++ b/src/WixToolset.Core/Bind/TransferFilesCommand.cs @@ -5,7 +5,6 @@ namespace WixToolset.Core.Bind using System; using System.Collections.Generic; using System.IO; - using System.Security.AccessControl; using WixToolset.Core.Native; using WixToolset.Data; using WixToolset.Extensibility; @@ -157,19 +156,13 @@ namespace WixToolset.Core.Bind // during the file transfer process. if (0 < destinationFiles.Count && !this.SuppressAclReset) { - var aclReset = new FileSecurity(); - aclReset.SetAccessRuleProtection(false, false); - try { - foreach (var file in destinationFiles) - { - new FileInfo(file).SetAccessControl(aclReset); - } + FileSystem.ResetAcls(destinationFiles); } - catch + catch (Exception e) { - this.Messaging.Write(WarningMessages.UnableToResetAcls()); + this.Messaging.Write(WarningMessages.UnableToResetAcls(e.Message)); } } } diff --git a/src/WixToolset.Core/WixToolset.Core.csproj b/src/WixToolset.Core/WixToolset.Core.csproj index abb9bcb8..902f63ce 100644 --- a/src/WixToolset.Core/WixToolset.Core.csproj +++ b/src/WixToolset.Core/WixToolset.Core.csproj @@ -24,7 +24,6 @@ you update these here, be sure to update them there. --> <ItemGroup> - <PackageReference Include="System.IO.FileSystem.AccessControl" Version="4.6.0" /> <PackageReference Include="System.Text.Encoding.CodePages" Version="4.6.0" /> <PackageReference Include="NuGet.Versioning" Version="5.6.0" /> </ItemGroup> -- cgit v1.2.3-55-g6feb