<div dir="ltr">Hi, this has been fixed in master.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 28, 2016 at 10:29 AM, Numpsy <span dir="ltr"><<a href="mailto:webby@beardmouse.org.uk" target="_blank">webby@beardmouse.org.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I've been trying to use the latest version of the Open XML SDK with Mono<br>
4.3.3 (built off the master branch), and as described at<br>
<a href="https://github.com/OfficeDev/Open-XML-SDK/issues/74" rel="noreferrer" target="_blank">https://github.com/OfficeDev/Open-XML-SDK/issues/74</a> I'm running into a<br>
problem that looks to be a Mono issue.<br>
<br>
I think it essentially reduces down to the situation that the code<br>
<br>
<br>
using (ZipArchive archive = new ZipArchive(input, ZipArchiveMode.Update))<br>
     {<br>
         ZipArchiveEntry selectorEntry = archive.GetEntry("readme.txt");<br>
         using (Stream temp = selectorEntry.Open())<br>
          {<br>
              Console.WriteLine("Open1");<br>
          }<br>
<br>
         using (Stream temp = selectorEntry.Open())<br>
          {<br>
               Console.WriteLine("Open2");<br>
          }<br>
     }<br>
<br>
Works on MS .NET4.5 but on Mono throws an exception on the second open,<br>
because it thinks the stream is already open although it has actually been<br>
closed.<br>
<br>
I'm wondering, should the<br>
<br>
 if (openStream != null && Archive.Mode == ZipArchiveMode.Update)<br>
                throw new IOException("The entry is already currently open<br>
for writing.");<br>
<br>
In ZipArchiveEntry.Open() be a bit more clever, and do something like check<br>
if the stream has been disposed, even though it's non-null?<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://mono.1490590.n4.nabble.com/ZipArchiveEntry-issue-with-reopening-entries-tp4667333.html" rel="noreferrer" target="_blank">http://mono.1490590.n4.nabble.com/ZipArchiveEntry-issue-with-reopening-entries-tp4667333.html</a><br>
Sent from the Mono - Dev mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Mono-devel-list mailing list<br>
<a href="mailto:Mono-devel-list@lists.ximian.com">Mono-devel-list@lists.ximian.com</a><br>
<a href="http://lists.ximian.com/mailman/listinfo/mono-devel-list" rel="noreferrer" target="_blank">http://lists.ximian.com/mailman/listinfo/mono-devel-list</a><br>
</blockquote></div><br></div>