[
  {
    "Id": "422770",
    "ThreadId": "207076",
    "Html": "<p>I am looking to update a small number of files in a zip (125 out of some 10000, specifically).&nbsp; I've been messing around with this library, checking discussions on here, and reading the documentation and cannot for the life of me get this to work how id like.&nbsp; Heres the closest that I've come:</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<div style=\"color:Black;background-color:White\">\r\n<pre><span style=\"color:Blue\">foreach</span> (<span style=\"color:Blue\">string</span> file <span style=\"color:Blue\">in</span> Directory.GetFiles(path, <span style=\"color:#A31515\">&quot;*.inibin&quot;</span>, SearchOption.AllDirectories))\r\n{\r\n    <span style=\"color:Blue\">string</span> relativePath = file.Substring(subPath.Length);\r\n    relativePath = relativePath.Substring(0, relativePath.LastIndexOf(<span style=\"color:#A31515\">@&quot;\\&quot;</span>));\r\n    zip.UpdateFile(file, relativePath);\r\n}\r\n</pre>\r\n</div>\r\n<p>&nbsp;</p>\r\n<p>My directory structure (and zip file structure) are as follows :</p>\r\n<p>DATA\\Characters\\&lt;NAME&gt;\\&lt;NAME&gt;.inibin</p>\r\n<p>or as an example:</p>\r\n<p>DATA\\Characters\\Ammon\\Ammon.inibin</p>\r\n<p>My goal is to update all of the *.inibin files in the Data\\Characters subdirectories.&nbsp; In the above code, i set the relativePath variable to be &quot;DATA\\Characters\\&lt;NAME&gt;&quot;.&nbsp; When i save the Zip, i end up with TWO &lt;NAME&gt;.inibin files in each folder.&nbsp; I don't even understand how that makes sense.&nbsp; They are placed in the right folder with the above code, but the existing file in the archive is not updated, it seems to be duplicated.&nbsp; When I extracted this file, I was prompted with a file replace as well (I guess the newer file replaces the older on extraction?).</p>\r\n<p>I've been making similar attempts (see:failures) with the UpdateEntry method, as this is the method that I think I will ideally want to use.&nbsp; Most alarmingly, when trying to use RemoveEntry with &quot;DATA\\Characters\\&lt;NAME&gt;\\&lt;NAME&gt;.inibin&quot; (which is the appropriate filename that I can see when debugging), I get an exception.&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>Am I missing something?&nbsp; Is there something that I've been doing  blatantly wrong?&nbsp; I hope I didn't make too detailed of a post!</p>",
    "PostedDate": "2010-03-23T14:28:48.46-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "422777",
    "ThreadId": "207076",
    "Html": "<p>NO, your post is not &quot;too detailed&quot;.&nbsp; HA!</p>\r\n<p>What version of the library are you using?&nbsp;</p>\r\n<p>I changed the way zip entries are handled internally, and that caused some problems with the handling of duplicate names.&nbsp; I've fixed that problem but I haven't released a build yet, with that fix.</p>\r\n<p>I'd like to see the exception you get with RemoveEntry().</p>\r\n<p>I'll write some tests to see if I can duplicate what you're seeing.&nbsp; I'll get back to you.</p>",
    "PostedDate": "2010-03-23T14:53:08.427-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "422798",
    "ThreadId": "207076",
    "Html": "<p>Wow, thanks for the incredibly fast response!&nbsp; I am using the latest version of the library - I just downloaded it today to see what I could cook up with it.</p>\r\n<p>&nbsp;</p>\r\n<p>The error that I get when I attempt to use RemoveEntry with the relativePath variable is just &quot;The entry you specified was not found in the zip archive.&quot;&nbsp; There was no inner exception or any other seemingly useful data. Let me know if theres anything else I can provide you with!</p>\r\n<p>&nbsp;</p>\r\n<p>As a workaround, I was able to get this kludge to work:\r\n<div style=\"color:Black;background-color:White\">\r\n<pre>...\r\nzip.RemoveEntry(getZipEntry(zip, relativePath))\r\n...\r\n\r\n<span style=\"color:Blue\">private</span> ZipEntry getZipEntry(ZipFile theZip, <span style=\"color:Blue\">string</span> fileName)\r\n{\r\n\t<span style=\"color:Blue\">foreach</span> (ZipEntry e <span style=\"color:Blue\">in</span> theZip.SelectEntries(<span style=\"color:#A31515\">&quot;*.inibin&quot;</span>))\r\n\t{\r\n\t\t<span style=\"color:Blue\">if</span> (e.FileName.Equals(fileName))\r\n\t\t{\r\n\t\t\t<span style=\"color:Blue\">return</span> e;\r\n\t\t}\r\n\t}\r\n\t<span style=\"color:Blue\">return</span> <span style=\"color:Blue\">null</span>;\r\n}\r\n</pre>\r\n</div>\r\nHowever - after successfully removing the entry, I was still getting 2 files in the zip file.&nbsp; Maybe an Entry doesnt behave as I am expecting?</p>",
    "PostedDate": "2010-03-23T15:47:21.2-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "423267",
    "ThreadId": "207076",
    "Html": "This discussion has been copied to a work item. Click <a href=\"http://dotnetzip.codeplex.com/WorkItem/View.aspx?WorkItemId=10499\">here</a> to go to the work item and continue the discussion.",
    "PostedDate": "2010-03-24T14:50:40.333-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "423595",
    "ThreadId": "207076",
    "Html": "<p>So you were able to reproduce this then?&nbsp; Were you seeing the same issue that I was regarding the duplicate entries?</p>\r\n<p>Are you aiming to fix this for the next release, and when should we expect that?&nbsp; Thanks!</p>",
    "PostedDate": "2010-03-25T07:30:49.683-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "424152",
    "ThreadId": "207076",
    "Html": "<p>No, I haven't tried yet.&nbsp; I should be able to spend some time on it later today.</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2010-03-26T09:26:55.977-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "441711",
    "ThreadId": "207076",
    "Html": "<p>There is DEFINITELY a bug here.&nbsp; I was getting into testing this some more, and I was having similar issues.&nbsp; Duplicate entries being created in the zip, failure to remove entries that I KNOW to exist, etc.&nbsp; For instance, this (silly, but damning) example fails:</p>\r\n<p>&nbsp;</p>\r\n<p>\r\n<div style=\"color:black;background-color:white\">\r\n<pre>ICollection&lt;ZipEntry&gt; entries = zip.SelectEntries(<span style=\"color:#a31515\">&quot;*.inibin&quot;</span>);\r\n\r\n<span style=\"color:blue\">foreach</span>(ZipEntry entry <span style=\"color:blue\">in</span> entries)\r\n{\r\n   zip.RemoveEntry(entry)\r\n}\r\n</pre>\r\n</div>\r\n</p>\r\n<p>To verify that it was a bug, I downloaded version 1.8.&nbsp; I ran my code with it, and... voila.&nbsp; Has anyone else made a comment on this bug?&nbsp; Have you been able to reproduce it Cheeso?</p>",
    "PostedDate": "2010-05-11T14:49:38.117-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "443994",
    "ThreadId": "207076",
    "Html": "Hello all,\r\n\r\nI am having the same issue with my program. So your saying version 1.8 works correctly? It’s strange how we are both actually working on the same project. I recognized that code immediately as LoL.",
    "PostedDate": "2010-05-17T14:26:30.797-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "444027",
    "ThreadId": "207076",
    "Html": "<blockquote style=\"border:solid .1em #ccc;font-style:italic;margin:.25em 1em 0 1em;padding:0 .25em 0 .25em\"><strong>1TBSSD wrote:</strong><br>Hello all,  I am having the same issue with my program. So your saying version 1.8 works correctly? It&rsquo;s strange how we are both actually working on the same project. I recognized that code immediately as LoL.</blockquote>\r\n<p>Haha, thats great.&nbsp; Are you one of the developers of one of the already posted 2 projects?&nbsp; I've been working on mine for quite awhile now but havent posted mine yet.&nbsp;</p>\r\n<p>Anyways - yes version 1.8 is working properly for me.&nbsp; Good luck!</p>",
    "PostedDate": "2010-05-17T15:50:40.54-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "444065",
    "ThreadId": "207076",
    "Html": "<blockquote style=\"border:solid .1em #ccc;font-style:italic;margin:.25em 1em 0 1em;padding:0 .25em 0 .25em\"><strong>yourbuddypal wrote:</strong><br>\r\n<blockquote style=\"border:solid .1em #ccc;font-style:italic;margin:.25em 1em 0 1em;padding:0 .25em 0 .25em\"><strong>1TBSSD wrote:</strong><br>Hello all, I am having the same issue with my program. So your saying version 1.8 works correctly? It&rsquo;s strange how we are both actually working on the same project. I recognized that code immediately as LoL.</blockquote>\r\n<p>Haha, thats great.&nbsp; Are you one of the developers of one of the already posted 2 projects?&nbsp; I've been working on mine for quite awhile now but havent posted mine yet.&nbsp;</p>\r\n<p>Anyways - yes version 1.8 is working properly for me.&nbsp; Good luck!</p>\r\n</blockquote>\r\n<p>&nbsp;I am not one of the two on the forums. I have my own seperate site for my project. <a href=\"http://sites.google.com/site/lolchanger\">http://sites.google.com/site/lolchanger</a>. Thanks for&nbsp;the info on 1.8. It works great.</p>",
    "PostedDate": "2010-05-17T19:31:35.37-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]