fix LZMA archive directory structure (#88)
This commit is contained in:
parent
08ec9a7e49
commit
659c008ea8
|
|
@ -18,7 +18,8 @@ namespace Microsoft.DotNet.Archive
|
|||
{
|
||||
public DestinationFileInfo(string destinationPath, string hash)
|
||||
{
|
||||
DestinationPath = destinationPath;
|
||||
// Normalize the path
|
||||
DestinationPath = destinationPath.Replace(Path.DirectorySeparatorChar, '/');
|
||||
Hash = hash;
|
||||
}
|
||||
|
||||
|
|
@ -30,11 +31,13 @@ namespace Microsoft.DotNet.Archive
|
|||
{
|
||||
public ArchiveSource(string sourceArchive, string sourceFile, string archivePath, string hash, long size)
|
||||
{
|
||||
SourceArchive = sourceArchive;
|
||||
SourceFile = sourceFile;
|
||||
ArchivePath = archivePath;
|
||||
Hash = hash;
|
||||
Size = size;
|
||||
|
||||
// Normalize the paths
|
||||
SourceArchive = sourceArchive?.Replace(Path.DirectorySeparatorChar, '/');
|
||||
SourceFile = sourceFile.Replace(Path.DirectorySeparatorChar, '/');
|
||||
ArchivePath = archivePath.Replace(Path.DirectorySeparatorChar, '/');
|
||||
}
|
||||
|
||||
public string SourceArchive { get; set; }
|
||||
|
|
|
|||
|
|
@ -31,7 +31,8 @@ namespace Microsoft.DotNet.Tools.Archive
|
|||
var externals = app.Option("--external <external>...", "External files and directories to consider for extraction", CommandOptionType.MultipleValue);
|
||||
var sources = app.Argument("<sources>...", "Files & directory to include in the archive", multipleValues: true);
|
||||
|
||||
app.OnExecute(() => {
|
||||
app.OnExecute(() =>
|
||||
{
|
||||
|
||||
if (extract.HasValue() && sources.Values.Any())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<EnableApiCheck>false</EnableApiCheck>
|
||||
<RuntimeIdentifier>win7-x64</RuntimeIdentifier>
|
||||
<RuntimeIdentifiers>win7-x64;linux-x64</RuntimeIdentifiers>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
Loading…
Reference in New Issue