From 5feb941ec5d057486de96fc9a186e0e128d7288d Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Wed, 7 Jun 2017 19:52:51 +0100 Subject: [PATCH] If specified size is 0, calculate length. --- DiscImageChef.Filters/ForcedSeekStream.cs | 2 ++ DiscImageChef.Filters/XZ.cs | 41 +++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 DiscImageChef.Filters/XZ.cs diff --git a/DiscImageChef.Filters/ForcedSeekStream.cs b/DiscImageChef.Filters/ForcedSeekStream.cs index 75a63a67c..037a1150c 100644 --- a/DiscImageChef.Filters/ForcedSeekStream.cs +++ b/DiscImageChef.Filters/ForcedSeekStream.cs @@ -60,6 +60,8 @@ namespace DiscImageChef.Filters baseStream = (T)Activator.CreateInstance(typeof(T), parameters); backFile = Path.GetTempFileName(); backStream = new FileStream(backFile, FileMode.Open, FileAccess.ReadWrite, FileShare.None); + if(length == 0) + CalculateLength(); } /// diff --git a/DiscImageChef.Filters/XZ.cs b/DiscImageChef.Filters/XZ.cs new file mode 100644 index 000000000..3e9cf7fe6 --- /dev/null +++ b/DiscImageChef.Filters/XZ.cs @@ -0,0 +1,41 @@ +// /*************************************************************************** +// The Disc Image Chef +// ---------------------------------------------------------------------------- +// +// Filename : XZ.cs +// Author(s) : Natalia Portillo +// +// Component : Component +// +// --[ Description ] ---------------------------------------------------------- +// +// Description +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2017 Natalia Portillo +// ****************************************************************************/ +using System; +namespace DiscImageChef.Filters +{ + public class XZ + { + public XZ() + { + } + } +}