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)
|
public DestinationFileInfo(string destinationPath, string hash)
|
||||||
{
|
{
|
||||||
DestinationPath = destinationPath;
|
// Normalize the path
|
||||||
|
DestinationPath = destinationPath.Replace(Path.DirectorySeparatorChar, '/');
|
||||||
Hash = hash;
|
Hash = hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -30,11 +31,13 @@ namespace Microsoft.DotNet.Archive
|
||||||
{
|
{
|
||||||
public ArchiveSource(string sourceArchive, string sourceFile, string archivePath, string hash, long size)
|
public ArchiveSource(string sourceArchive, string sourceFile, string archivePath, string hash, long size)
|
||||||
{
|
{
|
||||||
SourceArchive = sourceArchive;
|
|
||||||
SourceFile = sourceFile;
|
|
||||||
ArchivePath = archivePath;
|
|
||||||
Hash = hash;
|
Hash = hash;
|
||||||
Size = size;
|
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; }
|
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 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);
|
var sources = app.Argument("<sources>...", "Files & directory to include in the archive", multipleValues: true);
|
||||||
|
|
||||||
app.OnExecute(() => {
|
app.OnExecute(() =>
|
||||||
|
{
|
||||||
|
|
||||||
if (extract.HasValue() && sources.Values.Any())
|
if (extract.HasValue() && sources.Values.Any())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<EnableApiCheck>false</EnableApiCheck>
|
<EnableApiCheck>false</EnableApiCheck>
|
||||||
<RuntimeIdentifier>win7-x64</RuntimeIdentifier>
|
<RuntimeIdentifiers>win7-x64;linux-x64</RuntimeIdentifiers>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue