From bf9daf7547175f7a17b949feaeaa9f3cac388073 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 16 Mar 2021 14:50:48 -0700 Subject: Migrate ResetAcls to Core.Native from Core --- src/WixToolset.Core/Bind/TransferFilesCommand.cs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src/WixToolset.Core/Bind/TransferFilesCommand.cs') 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)); } } } -- cgit v1.2.3-55-g6feb