diff options
| author | Rob Mensching <rob@firegiant.com> | 2021-03-16 14:50:48 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2021-03-16 16:16:02 -0700 |
| commit | bf9daf7547175f7a17b949feaeaa9f3cac388073 (patch) | |
| tree | 9b712b54920fcac9f8cc21265424825d02bd0932 /src/WixToolset.Core/Bind/TransferFilesCommand.cs | |
| parent | 0b3381007cb201d5ee28aa80990cd14a1c376f18 (diff) | |
| download | wix-bf9daf7547175f7a17b949feaeaa9f3cac388073.tar.gz wix-bf9daf7547175f7a17b949feaeaa9f3cac388073.tar.bz2 wix-bf9daf7547175f7a17b949feaeaa9f3cac388073.zip | |
Migrate ResetAcls to Core.Native from Core
Diffstat (limited to 'src/WixToolset.Core/Bind/TransferFilesCommand.cs')
| -rw-r--r-- | src/WixToolset.Core/Bind/TransferFilesCommand.cs | 13 |
1 files changed, 3 insertions, 10 deletions
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 | |||
| 5 | using System; | 5 | using System; |
| 6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
| 7 | using System.IO; | 7 | using System.IO; |
| 8 | using System.Security.AccessControl; | ||
| 9 | using WixToolset.Core.Native; | 8 | using WixToolset.Core.Native; |
| 10 | using WixToolset.Data; | 9 | using WixToolset.Data; |
| 11 | using WixToolset.Extensibility; | 10 | using WixToolset.Extensibility; |
| @@ -157,19 +156,13 @@ namespace WixToolset.Core.Bind | |||
| 157 | // during the file transfer process. | 156 | // during the file transfer process. |
| 158 | if (0 < destinationFiles.Count && !this.SuppressAclReset) | 157 | if (0 < destinationFiles.Count && !this.SuppressAclReset) |
| 159 | { | 158 | { |
| 160 | var aclReset = new FileSecurity(); | ||
| 161 | aclReset.SetAccessRuleProtection(false, false); | ||
| 162 | |||
| 163 | try | 159 | try |
| 164 | { | 160 | { |
| 165 | foreach (var file in destinationFiles) | 161 | FileSystem.ResetAcls(destinationFiles); |
| 166 | { | ||
| 167 | new FileInfo(file).SetAccessControl(aclReset); | ||
| 168 | } | ||
| 169 | } | 162 | } |
| 170 | catch | 163 | catch (Exception e) |
| 171 | { | 164 | { |
| 172 | this.Messaging.Write(WarningMessages.UnableToResetAcls()); | 165 | this.Messaging.Write(WarningMessages.UnableToResetAcls(e.Message)); |
| 173 | } | 166 | } |
| 174 | } | 167 | } |
| 175 | } | 168 | } |
