diff options
| author | Rob Mensching <rob@firegiant.com> | 2017-12-21 13:42:52 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2017-12-21 13:42:52 -0800 |
| commit | dc9f4c329e6f55ce7595970463e0caf148096f4b (patch) | |
| tree | 86155ac36c76acda0a4b1673c77f54a9780c6885 /src/WixToolset.Core/Bind/TransferFilesCommand.cs | |
| parent | 155a6e96346e0cb3d9ab6f5372fa29b46ebaee89 (diff) | |
| download | wix-dc9f4c329e6f55ce7595970463e0caf148096f4b.tar.gz wix-dc9f4c329e6f55ce7595970463e0caf148096f4b.tar.bz2 wix-dc9f4c329e6f55ce7595970463e0caf148096f4b.zip | |
Support wixout and extract Resolve and Layout from Binder
Diffstat (limited to 'src/WixToolset.Core/Bind/TransferFilesCommand.cs')
| -rw-r--r-- | src/WixToolset.Core/Bind/TransferFilesCommand.cs | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/WixToolset.Core/Bind/TransferFilesCommand.cs b/src/WixToolset.Core/Bind/TransferFilesCommand.cs index 68d8b129..d4e143c3 100644 --- a/src/WixToolset.Core/Bind/TransferFilesCommand.cs +++ b/src/WixToolset.Core/Bind/TransferFilesCommand.cs | |||
| @@ -13,15 +13,15 @@ namespace WixToolset.Core.Bind | |||
| 13 | 13 | ||
| 14 | internal class TransferFilesCommand | 14 | internal class TransferFilesCommand |
| 15 | { | 15 | { |
| 16 | public TransferFilesCommand(IMessaging messaging, IEnumerable<BindPath> bindPaths, IEnumerable<IBinderExtension> extensions, IEnumerable<FileTransfer> fileTransfers, bool suppressAclReset) | 16 | public TransferFilesCommand(IMessaging messaging, IEnumerable<IFileSystemExtension> extensions, IEnumerable<FileTransfer> fileTransfers, bool suppressAclReset) |
| 17 | { | 17 | { |
| 18 | this.FileResolver = new FileResolver(bindPaths, extensions); | 18 | this.FileSystem = new FileSystem(extensions); |
| 19 | this.Messaging = messaging; | 19 | this.Messaging = messaging; |
| 20 | this.FileTransfers = fileTransfers; | 20 | this.FileTransfers = fileTransfers; |
| 21 | this.SuppressAclReset = suppressAclReset; | 21 | this.SuppressAclReset = suppressAclReset; |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | private FileResolver FileResolver { get; } | 24 | private FileSystem FileSystem { get; } |
| 25 | 25 | ||
| 26 | private IMessaging Messaging { get; } | 26 | private IMessaging Messaging { get; } |
| 27 | 27 | ||
| @@ -35,10 +35,8 @@ namespace WixToolset.Core.Bind | |||
| 35 | 35 | ||
| 36 | foreach (var fileTransfer in this.FileTransfers) | 36 | foreach (var fileTransfer in this.FileTransfers) |
| 37 | { | 37 | { |
| 38 | string fileSource = this.FileResolver.ResolveFile(fileTransfer.Source, fileTransfer.Type, fileTransfer.SourceLineNumbers, BindStage.Normal); | ||
| 39 | |||
| 40 | // If the source and destination are identical, then there's nothing to do here | 38 | // If the source and destination are identical, then there's nothing to do here |
| 41 | if (0 == String.Compare(fileSource, fileTransfer.Destination, StringComparison.OrdinalIgnoreCase)) | 39 | if (0 == String.Compare(fileTransfer.Source, fileTransfer.Destination, StringComparison.OrdinalIgnoreCase)) |
| 42 | { | 40 | { |
| 43 | fileTransfer.Redundant = true; | 41 | fileTransfer.Redundant = true; |
| 44 | continue; | 42 | continue; |
| @@ -51,13 +49,13 @@ namespace WixToolset.Core.Bind | |||
| 51 | { | 49 | { |
| 52 | if (fileTransfer.Move) | 50 | if (fileTransfer.Move) |
| 53 | { | 51 | { |
| 54 | this.Messaging.Write(VerboseMessages.MoveFile(fileSource, fileTransfer.Destination)); | 52 | this.Messaging.Write(VerboseMessages.MoveFile(fileTransfer.Source, fileTransfer.Destination)); |
| 55 | this.TransferFile(true, fileSource, fileTransfer.Destination); | 53 | this.TransferFile(true, fileTransfer.Source, fileTransfer.Destination); |
| 56 | } | 54 | } |
| 57 | else | 55 | else |
| 58 | { | 56 | { |
| 59 | this.Messaging.Write(VerboseMessages.CopyFile(fileSource, fileTransfer.Destination)); | 57 | this.Messaging.Write(VerboseMessages.CopyFile(fileTransfer.Source, fileTransfer.Destination)); |
| 60 | this.TransferFile(false, fileSource, fileTransfer.Destination); | 58 | this.TransferFile(false, fileTransfer.Source, fileTransfer.Destination); |
| 61 | } | 59 | } |
| 62 | 60 | ||
| 63 | retry = false; | 61 | retry = false; |
| @@ -183,11 +181,11 @@ namespace WixToolset.Core.Bind | |||
| 183 | 181 | ||
| 184 | if (move) | 182 | if (move) |
| 185 | { | 183 | { |
| 186 | complete = this.FileResolver.MoveFile(source, destination, true); | 184 | complete = this.FileSystem.MoveFile(source, destination, true); |
| 187 | } | 185 | } |
| 188 | else | 186 | else |
| 189 | { | 187 | { |
| 190 | complete = this.FileResolver.CopyFile(source, destination, true); | 188 | complete = this.FileSystem.CopyFile(source, destination, true); |
| 191 | } | 189 | } |
| 192 | 190 | ||
| 193 | if (!complete) | 191 | if (!complete) |
