Try to fix frameworks again by matching JSON.NET

This commit is contained in:
Adam Hathcock
2016-08-12 12:14:22 +01:00
parent bd8ba7b854
commit b0b62fcf91
2 changed files with 19 additions and 27 deletions

View File

@@ -355,7 +355,7 @@ namespace SharpCompress.Compressor.Deflate
}
}
public String FileName
public string FileName
{
get { return fileName; }
set
@@ -372,10 +372,20 @@ namespace SharpCompress.Compressor.Deflate
if (fileName.EndsWith("\\"))
throw new InvalidOperationException("Illegal filename");
if (fileName.IndexOf("\\") != -1)
var index = fileName.IndexOf("\\");
if (index != -1)
{
// trim any leading path
fileName = Path.GetFileName(fileName);
int length = fileName.Length;
int num = length;
while (--num >= 0)
{
char c = fileName[num];
if (c == '\\')
{
fileName = fileName.Substring(num + 1, length - num - 1);
}
}
}
}
}

View File

@@ -1,5 +1,5 @@
{
"version": "0.12.3",
"version": "0.12.4",
"title": "SharpCompress - Pure C# Decompression/Compression",
"authors": [ "Adam Hathcock" ],
"language": "en-US",
@@ -11,29 +11,19 @@
"description": "SharpCompress is a compression library for .NET/Mono/Silverlight/WP7/WindowsStore that can unrar, decompress 7zip, zip/unzip, tar/untar bzip2/unbzip2 and gzip/ungzip with forward-only reading and file random access APIs. Write support for zip/tar/bzip2/gzip is implemented.",
"requireLicenseAcceptance": false
},
"buildOptions": {
"warningsAsErrors": true,
"allowUnsafe": true
},
"frameworks": {
"net35": {
"buildOptions": {
"warningsAsErrors": true,
"allowUnsafe": true
}
},
"net40": {
"buildOptions": {
"warningsAsErrors": true,
"allowUnsafe": true
}
},
"net45": {
"buildOptions": {
"warningsAsErrors": true,
"allowUnsafe": true
}
},
"sl5": {
".NETPortable,Version=v4.0,Profile=Profile328": {
"buildOptions": {
"warningsAsErrors": true,
"allowUnsafe": true,
"define": [ "NO_FILE", "NO_CRYPTO", "SILVERLIGHT" ]
},
"frameworkAssemblies": {
@@ -44,8 +34,6 @@
},
".NETPortable,Version=v4.5,Profile=Profile259": {
"buildOptions": {
"warningsAsErrors": true,
"allowUnsafe": true,
"define": [ "NO_FILE", "NO_CRYPTO", "SILVERLIGHT" ]
},
"frameworkAssemblies": {
@@ -64,8 +52,6 @@
},
"netstandard1.0": {
"buildOptions": {
"warningsAsErrors": true,
"allowUnsafe": true,
"define": [ "NO_FILE", "NO_CRYPTO" ]
},
"dependencies": {
@@ -79,10 +65,6 @@
}
},
"netstandard1.3": {
"buildOptions": {
"warningsAsErrors": true,
"allowUnsafe": true
},
"dependencies": {
"System.Collections": "4.0.11",
"System.Diagnostics.Debug": "4.0.11",