{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "fixed in changeset 81459.  First binary with this fix&#58;  v1.9.1.6",
    "ClosedDate": "2011-08-02T12:07:30.57-07:00",
    "CommentCount": 0,
    "Custom": null,
    "Description": "from discussion http://dotnetzip.codeplex.com/Thread/View.aspx?ThreadId=200380\n \nHi.  Sorry it took so long to get the information about this problem.  From the following job log, it looks like the file that's getting the \"already exists\" error is the DotNetZip temporary file, not the actual file name.  Is this possible?\n \n=====================\n \n03:16:36 I The workflow has started\n \nStart OK File processing.\n \n03:16:36 I Activity 'ForEachFileOK' started\n \nOK File: account_2010-03-06.ok\n \n03:16:37 I Activity 'Archive' started\n \n03:16:37 I Activity 'Archive' failed\n \n03:16:37 E IOException in step 'Archive': The file '\\\\tnt-chi-fs002\\IRPT\\Prod\\SYS\\DotNetZip-aovzxmue.tmp' already exists.\n \n03:16:37 I Activity 'ForEachFileOK' failed\n \n03:16:37 E IOException in step 'ForEachFileOK': The file '\\\\tnt-chi-fs002\\IRPT\\Prod\\SYS\\DotNetZip-aovzxmue.tmp' already exists.\n \n03:16:37 E The workflow has faulted",
    "LastUpdatedDate": "2013-05-16T05:31:51.67-07:00",
    "PlannedForRelease": "v1.9.1.8 DotNetZip - Latest Stable",
    "ReleaseVisibleToPublic": true,
    "Priority": {
      "Name": "Low",
      "Severity": 50,
      "Id": 1
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2010-03-16T14:32:51.45-07:00",
    "Status": {
      "Name": "Closed",
      "Id": 4
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "\"File already exists\" error when adding new file to a zip file",
    "Type": {
      "Name": "Issue",
      "Id": 3
    },
    "VoteCount": 1,
    "Id": 10447
  },
  "FileAttachments": [],
  "Comments": [
    {
      "Message": "Some additional information:  this problem occurs when two workflows are running concurrently, both zipping different files from the same directory.",
      "PostedDate": "2010-03-17T08:10:33.667-07:00",
      "Id": -2147483648
    },
    {
      "Message": "Hi,\r\nWere you able to find anything about this?\r\n\r\nThanks\r\n",
      "PostedDate": "2010-03-25T07:32:02.78-07:00",
      "Id": -2147483648
    },
    {
      "Message": "I could recreate the same problem with this sample code, I have a SSD, at about 110 I get the exception\r\n\r\n var zipName = @\"C:\\files\\test.zip\";            \r\n                      \r\n            var zip = new Ionic.Zip.ZipFile(zipName);            \r\n                      \r\n            var fileInfo = new FileInfo(@\"C:\\files\\1k.txt\");\r\n            \r\n            for(int i=0;i<1000;i++)\r\n            {\r\n                var fs = fileInfo.OpenRead();              \r\n                \r\n                    zip.AddEntry(i + \".sql\", fs);\r\n                    zip.Save();\r\n                \r\n                fs.Close();\r\n                Console.WriteLine(i);\r\n                \r\n            }\r\n",
      "PostedDate": "2011-02-15T17:07:46.54-08:00",
      "Id": -2147483648
    },
    {
      "Message": "I can recreate this problem with no DotNetZip code at all - just calls to System.IO.File.Delete() and System.IO.File.Move(), done in a loop.  \r\n\r\nThe call to File.Delete() appears to return before the file is actually, completely, really deleted. \r\nI may need to insert a backoff-and-retry to handle this race condition.  Need more research.\r\n",
      "PostedDate": "2011-08-01T15:20:49.49-07:00",
      "Id": -2147483648
    },
    {
      "Message": "See also, this Question and Answer: \r\nhttp://stackoverflow.com/questions/6466940/system-io-file-delete-system-io-file-move-sometimes-does-not-work/6468131#6468131",
      "PostedDate": "2011-08-01T15:24:23.583-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2011-08-02T07:59:22.763-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2011-08-02T12:07:30.57-07:00",
      "Id": -2147483648
    },
    {
      "Message": "Pursuant to the comment above about two workflows running concurrently and causing a temp file collision, I had a user get the following error when trying to add files to a zip.  Below is the entire stack trace.  Two things I don't understand:\r\n\r\n1.  I haven't specified a separate path for zip temp files to go to, and I can't see them being created in the final zip directory, even though I am showing hidden files.\r\n\r\n2.  Because of #1, I can't see why DotNetZip would be trying to create temp files in an E: path, since my app has no hardcoded paths, just relative ones, and the app is running on the C: drive.\r\n\r\nAny ideas why DotNetZip might be trying to write temp files to E:\\(the rest of the path in the stack trace is my relative app path) and why I'm not seeing the temp files being created?  How are folks working around this?\r\n\r\nThanks.\r\n\r\nLaura\r\n\r\nERROR: System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'E:\\GIS_Sites\\tcds\\reports\\output\\68\\scottk\\zip\\DotNetZip-ftnr3n4u.tmp'.\n   at Microsoft.VisualBasic.CompilerServices.Symbols.Container.InvokeMethod(Method TargetProcedure, Object[] Arguments, Boolean[] CopyBack, BindingFlags Flags)\n   at Microsoft.VisualBasic.CompilerServices.NewLateBinding.CallMethod(Container BaseReference, String MethodName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, BindingFlags InvocationFlags, Boolean ReportErrors, ResolutionFailure& Failure)\n   at Microsoft.VisualBasic.CompilerServices.NewLateBinding.ObjectLateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn)\n   at tcds_bulk_reports.btnBulkRpt_Click(Object sender, EventArgs e)\n   at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)\n   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)\n   at System.Web.UI.Page.HandleError(Exception e)\n   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)\n   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)\n   at System.Web.UI.Page.ProcessRequest()\n   at System.Web.UI.Page.ProcessRequest(HttpContext context)\n   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()\n   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)\n",
      "PostedDate": "2013-02-21T14:27:23.09-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-02-21T18:43:37.637-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-05-16T05:31:51.67-07:00",
      "Id": -2147483648
    }
  ]
}