REFACTOR: Final cleanup of DiscImageChef.Filters.

This commit is contained in:
2017-12-24 02:43:49 +00:00
parent 4115698ac8
commit f9cc6e6918
13 changed files with 495 additions and 487 deletions

View File

@@ -37,17 +37,17 @@ using SharpCompress.Compressors.Xz;
namespace DiscImageChef.Filters
{
/// <summary>
/// Decompress xz files while reading
/// Decompress xz files while reading
/// </summary>
public class XZ : Filter
{
Stream dataStream;
string basePath;
DateTime lastWriteTime;
DateTime creationTime;
bool opened;
Stream dataStream;
long decompressedSize;
Stream innerStream;
DateTime lastWriteTime;
bool opened;
public XZ()
{
@@ -242,7 +242,10 @@ namespace DiscImageChef.Filters
{
if(basePath?.EndsWith(".xz", StringComparison.InvariantCultureIgnoreCase) == true)
return basePath.Substring(0, basePath.Length - 3);
return basePath?.EndsWith(".xzip", StringComparison.InvariantCultureIgnoreCase) == true ? basePath.Substring(0, basePath.Length - 5) : basePath;
return basePath?.EndsWith(".xzip", StringComparison.InvariantCultureIgnoreCase) == true
? basePath.Substring(0, basePath.Length - 5)
: basePath;
}
public override string GetParentFolder()