[
  {
    "Id": "1137162",
    "ThreadId": "474392",
    "Html": "Hi,\r<br />\nI've been using the library for a few months on Windows 2008, but now that I've moved it to Windows 2012 R2 it's throwing an exception every time I run it.\r<br />\n<br />\nMy program updates a ZIP which contains a single file, by overwriting the ZIP file:<br />\n<pre><code>using (ZipFile zip = new ZipFile())\n{\n    zip.ParallelDeflateThreshold = -1;\n    zip.AddFile(settings.SQLiteDbFilePath, String.Empty);\n    zip.Save(settings.ZipFilePath);\n}</code></pre>\n\nHowever this now throws the following exception:<br />\n<pre><code>Unhandled Exception: System.ArgumentException: An item with the same key has already been added.\n   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)\n   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)\n   at Ionic.Zip.ZipFile.InternalAddEntry(String name, ZipEntry entry)\n   at Ionic.Zip.ZipFile._InternalAddEntry(ZipEntry ze)\n   at Ionic.Zip.ZipFile.AddFile(String fileName, String directoryPathInArchive)</code></pre>\n\nI thought that calling Save('filename') would simply overwrite the existing file, but as I'm getting an exception, I presume it's somehow trying to merge the temporary zip file with the file I've told it to save over. \r<br />\n<br />\nAm I misunderstanding how it works?  All I want to do is totally replace the destination zip with the new one.  I realise I could delete the file first, but it's non-ideal to have this missing for any period of time (even a few seconds) and if you Delete the file programatically, it still seems to be there after a few seconds.\r<br />\n<br />\nAny help appreciated!\r<br />\n<br />\nNick<br />\n",
    "PostedDate": "2013-12-17T08:11:06.59-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "1137263",
    "ThreadId": "474392",
    "Html": "Check the call stack.  It's throwing the exception when adding the file not when saving the ZIP file.  As I recall, there is a method to update a file that's already there.\r<br />\n<br />\nEric<br />\n",
    "PostedDate": "2013-12-17T12:55:43.013-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "1137611",
    "ThreadId": "474392",
    "Html": "But at that point, it doesn't even know about the existing zip file as it hasn't been passed the file name yet, so I'm not sure that's what's happening.\r<br />\n<br />\nNick<br />\n",
    "PostedDate": "2013-12-18T08:52:38.817-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]