[
  {
    "Id": "250937",
    "ThreadId": "73426",
    "Html": "<p>When I unzip a file created by dotNetZip, it asks me for a password even though I didn't set one.&nbsp; The other weird issue is that it only happens sometimes.&nbsp; I can't figure out what could be causing it.&nbsp; Any ideas?</p>\r\n<p>I am using version 1.8.4.21</p>\r\n<p>Code</p>\r\n<p>\r\n<div style=\"color:Black;background-color:White\">\r\n<pre>            ZipFile zipfile = <span style=\"color:Blue\">new</span> ZipFile(zipFileName);<span style=\"color:Green\">//create zip named zipFileName.zip     </span>\r\n            zipfile.AddDirectory(sourceFolder,subfoldername);<span style=\"color:Green\">//add the sourceFolderContents to the zip file</span>\r\n\r\n            \r\n            <span style=\"color:Blue\">var</span> pathToZip = destinationFolder + &quot;\\\\&quot; + zipFileName;\r\n            zipfile.Save(pathToZip);<span style=\"color:Green\">//save file in the destination folder</span>\r\n</pre>\r\n</div>\r\n</p>",
    "PostedDate": "2009-10-28T16:55:34.737-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "250988",
    "ThreadId": "73426",
    "Html": "<p>Hi there.</p>\r\n<p>How do you unzip the file?&nbsp; using what?&nbsp;&nbsp; What &quot;asks you&quot; for a password?</p>\r\n<p>That code you show - do you have a using clause?&nbsp; &nbsp;or a try...finally?&nbsp;&nbsp; The ZipFile is IDisposable.&nbsp; Do you call ZipFile.Dispose()?&nbsp; You need to, when you're done. Look at any example - it will show how to do it.&nbsp;</p>\r\n<p>From time to time there are bugs uncovered in the library.&nbsp; But I don't recall anything like this.&nbsp; I run lots and lots of tests, every&nbsp; time I post a release, and I never get a &quot;ask for a password&quot; when there was no password used.&nbsp;&nbsp;</p>\r\n<p>The first thing I would do, if I were you, is tighten up that code, and do a little more research on just when it asks for a password, and when your zip opener doesn't.&nbsp; Narrow it down.</p>\r\n<p>I'm glad to help in any way. If you can show me code that reliably produces a broken zip file, I am definitely interested in that.</p>\r\n<p>-Cheeso</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-10-28T19:25:04.743-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "250991",
    "ThreadId": "73426",
    "Html": "I'm using the built in windows zip program to unzip the file.  That program prompts me for a password when I unzip the file.  I am not calling ZipFile.Dispose().  I'll make that change, run some tests, and let you know what I find out.<br>\r\n<br>Thanks.<br><br><div>On Wed, Oct 28, 2009 at 10:25 PM, Cheeso <span dir=ltr>&lt;<a href=\"mailto:notifications@codeplex.com\">notifications@codeplex.com</a>&gt;</span> wrote:<br><blockquote style=\"margin:0pt 0pt 0pt 0.8ex;padding-left:1ex\">\r\n   <div> <p>From: Cheeso</p> <div><p>Hi there.</p>\r\n<p>How do you unzip the file?  using what?   What &quot;asks you&quot; for a password?</p>\r\n<p>That code you show - do you have a using clause?   or a try...finally?   The ZipFile is IDisposable.  Do you call ZipFile.Dispose()?  You need to, when you're done. Look at any example - it will show how to do it. </p>\r\n\r\n<p>From time to time there are bugs uncovered in the library.  But I don't recall anything like this.  I run lots and lots of tests, every  time I post a release, and I never get a &quot;ask for a password&quot; when there was no password used.  </p>\r\n\r\n<p>The first thing I would do, if I were you, is tighten up that code, and do a little more research on just when it asks for a password, and when your zip opener doesn't.  Narrow it down.</p>\r\n<p>I'm glad to help in any way. If you can show me code that reliably produces a broken zip file, I am definitely interested in that.</p>\r\n<p>-Cheeso</p>\r\n<p> </p></div><div> <div> <p>Read the <a href=\"http://dotnetzip.codeplex.com/Thread/View.aspx?ThreadId=73426&ANCHOR#Post250988\">full discussion online</a>.</p> <p>To add a post to this discussion, reply to this email (<a href=\"mailto:DotNetZip@discussions.codeplex.com?subject=[DotNetZip:73426]\">DotNetZip@discussions.codeplex.com</a>)</p>\r\n <p>To start a new discussion for this project, email <a href=\"mailto:DotNetZip@discussions.codeplex.com\">DotNetZip@discussions.codeplex.com</a></p> <p>You are receiving this email because you subscribed to this discussion on CodePlex. You can <a href=\"http://www.codeplex.com/site/discussions/thread/unsubscribe/73426\">unsubscribe</a> on codePlex.com.</p>\r\n <p>Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at <a href=\"http://codeplex.com\">codeplex.com</a></p> </div> </div></div> </blockquote>\r\n</div><br>",
    "PostedDate": "2009-10-28T19:30:19.333-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "250995",
    "ThreadId": "73426",
    "Html": "<p>Sounds great.</p>\r\n<p>Oh, another thing I noticed.&nbsp; In your code, you specify the name for the&nbsp;zipfile twice, and differently.&nbsp;&nbsp; You specify when instantiating the ZipFile object, and also when calling Save().&nbsp; That really isn't necessary.&nbsp; Thinking about it now, there are 300+ tests, but I don't believe I have any tests that do *that.&nbsp;&nbsp;&nbsp; It just may be that it produces a screwy zip file, sometimes.&nbsp; I'll add some tests and investigate.&nbsp;&nbsp; But in the meantime, what I would suggest is that you specify the zipfile name, in one place or the other, but not both.&nbsp; Either in the constructor, or in the Save() call, but not both.&nbsp;</p>\r\n<p>Something like this:</p>\r\n<div style=\"color:Black;background-color:White\">\r\n<pre><span style=\"color:Green\">// create a ZipFile object, with no backing store, just yet</span>\r\n<span style=\"color:Blue\">using</span> (ZipFile zipfile = <span style=\"color:Blue\">new</span> ZipFile())  <span style=\"color:Green\">// &lt;&lt;-- notice: no file name !</span>\r\n{\r\n    <span style=\"color:Green\">// add the sourceFolderContents to the zip file</span>\r\n    zipfile.AddDirectory(sourceFolder,subfoldername);\r\n\r\n    <span style=\"color:Green\">// now, save file in the destination folder</span>\r\n    <span style=\"color:Blue\">var</span> pathToZip = System.IO.Path.Combine(destinationFolder, zipFileName);\r\n    zipfile.Save(pathToZip);\r\n}\r\n\r\n</pre>\r\n</div>",
    "PostedDate": "2009-10-28T19:47:15.47-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "251438",
    "ThreadId": "73426",
    "Html": "I ran this code in an <a href=\"http://asp.net\">asp.net</a> website and kept getting the same prompt for a password when I upzipped it.<br><br> var zipFileName = DateTime.Now.ToFileTime() + &quot;test.zip&quot;;<br>            var destinationFolder = @&quot;F:\\Documents and Settings\\Administrator\\Desktop\\ZipTest\\ZipTest\\ZipTest\\zipto&quot;;<br>\r\n            var pathToZip = System.IO.Path.Combine(destinationFolder, zipFileName);<br>            var sourceFolder = @&quot;F:\\Documents and Settings\\Administrator\\Desktop\\hic&quot;;<br><br>            using (ZipFile zipFile = new ZipFile(pathToZip))<br>\r\n            {<br>                zipFile.AddDirectory(sourceFolder);<br>                zipFile.Save();<br><br>            }      <br><br>I then decided to just make a simple console app with the same code above.  Now when I unzip it, it doesn't ask for a password.  That means DotNetZip isn't causing the error.  Something to do with <a href=\"http://asp.net\">asp.net</a>, IIS, or some other configuration.<br>\r\n<br>Thanks for your help.<br><br><div>On Wed, Oct 28, 2009 at 10:47 PM, Cheeso <span dir=ltr>&lt;<a href=\"mailto:notifications@codeplex.com\">notifications@codeplex.com</a>&gt;</span> wrote:<br><blockquote style=\"margin:0pt 0pt 0pt 0.8ex;padding-left:1ex\">\r\n   <div> <p>From: Cheeso</p> <div><p>Sounds great.</p>\r\n<p>Oh, another thing I noticed.  In your code, you specify the zipfile twice, and differently.   You specify when instantiating the ZipFile object, and also when calling Save().  That really isn't necessary.  Thinking about it now, I don't believe I have any tests that do *that*, and it just may be that it produces a screwy zip file, sometimes.  What I would suggest is that you specify the zipfile name, in one place or the other, but not both.  Either in the constructor, or in the Save() call, but not both. </p>\r\n\r\n<p>Something like this:</p>\r\n<div style=\"color:Black;background-color:White\">\r\n<pre><span style=\"color:Green\">// create a ZipFile object, with no backing store, just yet</span>\r\n<span style=\"color:Blue\">using</span> (ZipFile zipfile = <span style=\"color:Blue\">new</span> ZipFile())  <span style=\"color:Green\">// &lt;&lt;-- notice: no file name !</span>\r\n{\r\n    <span style=\"color:Green\">// add the sourceFolderContents to the zip file</span>\r\n    zipfile.AddDirectory(sourceFolder,subfoldername);\r\n\r\n    <span style=\"color:Green\">// now, save file in the destination folder</span>\r\n    <span style=\"color:Blue\">var</span> pathToZip = System.IO.Path.Combine(destinationFolder, zipFileName);\r\n    zipfile.Save(pathToZip);\r\n}\r\n\r\n</pre>\r\n</div></div><div> <div> <p>Read the <a href=\"http://dotnetzip.codeplex.com/Thread/View.aspx?ThreadId=73426&ANCHOR#Post250995\">full discussion online</a>.</p> <p>To add a post to this discussion, reply to this email (<a href=\"mailto:DotNetZip@discussions.codeplex.com?subject=[DotNetZip:73426]\">DotNetZip@discussions.codeplex.com</a>)</p>\r\n <p>To start a new discussion for this project, email <a href=\"mailto:DotNetZip@discussions.codeplex.com\">DotNetZip@discussions.codeplex.com</a></p> <p>You are receiving this email because you subscribed to this discussion on CodePlex. You can <a href=\"http://www.codeplex.com/site/discussions/thread/unsubscribe/73426\">unsubscribe</a> on codePlex.com.</p>\r\n <p>Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at <a href=\"http://codeplex.com\">codeplex.com</a></p> </div> </div></div> </blockquote>\r\n</div><br>",
    "PostedDate": "2009-10-29T18:32:29.373-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "251449",
    "ThreadId": "73426",
    "Html": "Would the names of the files getting zipped affect DotNetZip?<br><br>I changed the code to rename all the files to short file names prior to zipping.  After DotNetZip renames and zips, I extract it with windows zip, and it doesn't prompt me for a password.<br>\r\n<br>FYI - I am zipping up a large number of files with long file names<br><br>Here's a sample of the original files before zipping:<br>FileSize    FileName<br>3,910,100 Copy (17) of 02_iso100_14mm.jpg<br>6,620,910 Copy (17) of 05_iso100_14mm.jpg<br>\r\n6,830,197 Copy (17) of 15_megapixels.jpg<br>8,163,360 Copy (17) of church.jpg<br>4,297,120 Copy (17) of D3_1118_14-24_24mm_f2.8.JPG<br>3,910,100 Copy (18) of 02_iso100_14mm.jpg<br>6,620,910 Copy (18) of 05_iso100_14mm.jpg<br>\r\n6,830,197 Copy (18) of 15_megapixels.jpg<br>8,163,360 Copy (18) of church.jpg<br>4,297,120 Copy (18) of D3_1118_14-24_24mm_f2.8.JPG<br>3,910,100 Copy (19) of 02_iso100_14mm.jpg<br>6,620,910 Copy (19) of 05_iso100_14mm.jpg<br>\r\n6,830,197 Copy (19) of 15_megapixels.jpg<br>8,163,360 Copy (19) of church.jpg<br>4,297,120 Copy (19) of D3_1118_14-24_24mm_f2.8.JPG<br>3,910,100 Copy (2) of 02_iso100_14mm.jpg<br>6,620,910 Copy (2) of 05_iso100_14mm.jpg<br>\r\n6,830,197 Copy (2) of 15_megapixels.jpg<br>8,163,360 Copy (2) of church.jpg<br>3,910,100 Copy (2) of Copy of 02_iso100_14mm.jpg<br>6,620,910 Copy (2) of Copy of 05_iso100_14mm.jpg<br>6,830,197 Copy (2) of Copy of 15_megapixels.jpg<br>\r\n8,163,360 Copy (2) of Copy of church.jpg<br>3,910,100 Copy (2) of Copy of Copy of 02_iso100_14mm.jpg<br>6,620,910 Copy (2) of Copy of Copy of 05_iso100_14mm.jpg<br>6,830,197 Copy (2) of Copy of Copy of 15_megapixels.jpg<br>\r\n8,163,360 Copy (2) of Copy of Copy of church.jpg<br>3,910,100 Copy (2) of Copy of Copy of Copy of 02_iso100_14mm.jpg<br>6,620,910 Copy (2) of Copy of Copy of Copy of 05_iso100_14mm.jpg<br>6,830,197 Copy (2) of Copy of Copy of Copy of 15_megapixels.jpg<br>\r\n8,163,360 Copy (2) of Copy of Copy of Copy of church.jpg<br>3,910,100 Copy (2) of Copy of Copy of Copy of Copy of 02_iso100_14mm.jpg<br>6,620,910 Copy (2) of Copy of Copy of Copy of Copy of 05_iso100_14mm.jpg<br>3,764,006 Copy (2) of Copy of Copy of Copy of Copy of 10_iso100_14mm.jpg<br>\r\n6,830,197 Copy (2) of Copy of Copy of Copy of Copy of 15_megapixels.jpg<br>8,163,360 Copy (2) of Copy of Copy of Copy of Copy of church.jpg<br>4,297,120 Copy (2) of Copy of Copy of Copy of Copy of D3_1118_14-24_24mm_f2.8.JPG<br>\r\n4,297,120 Copy (2) of Copy of Copy of Copy of D3_1118_14-24_24mm_f2.8.JPG<br>4,297,120 Copy (2) of Copy of Copy of D3_1118_14-24_24mm_f2.8.JPG<br>4,297,120 Copy (2) of Copy of D3_1118_14-24_24mm_f2.8.JPG<br>4,297,120 Copy (2) of D3_1118_14-24_24mm_f2.8.JPG<br>\r\n3,910,100 Copy (20) of 02_iso100_14mm.jpg<br>6,620,910 Copy (20) of 05_iso100_14mm.jpg<br>6,830,197 Copy (20) of 15_megapixels.jpg<br>8,163,360 Copy (20) of church.jpg<br>4,297,120 Copy (20) of D3_1118_14-24_24mm_f2.8.JPG<br>\r\n3,910,100 Copy (21) of 02_iso100_14mm.jpg<br>6,620,910 Copy (21) of 05_iso100_14mm.jpg<br>6,830,197 Copy (21) of 15_megapixels.jpg<br>8,163,360 Copy (21) of church.jpg<br>4,297,120 Copy (21) of D3_1118_14-24_24mm_f2.8.JPG<br>\r\n3,910,100 Copy (22) of 02_iso100_14mm.jpg<br>6,620,910 Copy (22) of 05_iso100_14mm.jpg<br>6,830,197 Copy (22) of 15_megapixels.jpg<br>8,163,360 Copy (22) of church.jpg<br>4,297,120 Copy (22) of D3_1118_14-24_24mm_f2.8.JPG<br>\r\n3,910,100 Copy (23) of 02_iso100_14mm.jpg<br>6,620,910 Copy (23) of 05_iso100_14mm.jpg<br>6,830,197 Copy (23) of 15_megapixels.jpg<br>8,163,360 Copy (23) of church.jpg<br>4,297,120 Copy (23) of D3_1118_14-24_24mm_f2.8.JPG<br>\r\n3,910,100 Copy (24) of 02_iso100_14mm.jpg<br>6,620,910 Copy (24) of 05_iso100_14mm.jpg<br>6,830,197 Copy (24) of 15_megapixels.jpg<br>8,163,360 Copy (24) of church.jpg<br>4,297,120 Copy (24) of D3_1118_14-24_24mm_f2.8.JPG<br>\r\n3,910,100 Copy (25) of 02_iso100_14mm.jpg<br>6,620,910 Copy (25) of 05_iso100_14mm.jpg<br>6,830,197 Copy (25) of 15_megapixels.jpg<br>8,163,360 Copy (25) of church.jpg<br><br><div>On Thu, Oct 29, 2009 at 9:32 PM, bbolton <span dir=ltr>&lt;<a href=\"mailto:notifications@codeplex.com\">notifications@codeplex.com</a>&gt;</span> wrote:<br>\r\n<blockquote style=\"margin:0pt 0pt 0pt 0.8ex;padding-left:1ex\">   <div> <p>From: bbolton</p><div><div></div><div> <div>I ran this code in an <a href=\"http://asp.net\">asp.net</a> website and kept getting the same prompt for a password when I upzipped it.<br>\r\n<br> var zipFileName = DateTime.Now.ToFileTime() + &quot;test.zip&quot;;<br>            var destinationFolder = @&quot;F:\\Documents and Settings\\Administrator\\Desktop\\ZipTest\\ZipTest\\ZipTest\\zipto&quot;;<br>\r\n            var pathToZip = System.IO.Path.Combine(destinationFolder, zipFileName);<br>            var sourceFolder = @&quot;F:\\Documents and Settings\\Administrator\\Desktop\\hic&quot;;<br><br>            using (ZipFile zipFile = new ZipFile(pathToZip))<br>\r\n\r\n            {<br>                zipFile.AddDirectory(sourceFolder);<br>                zipFile.Save();<br><br>            }      <br><br>I then decided to just make a simple console app with the same code above.  Now when I unzip it, it doesn't ask for a password.  That means DotNetZip isn't causing the error.  Something to do with <a href=\"http://asp.net\">asp.net</a>, IIS, or some other configuration.<br>\r\n\r\n<br>Thanks for your help.<br><br><div>On Wed, Oct 28, 2009 at 10:47 PM, Cheeso <span dir=ltr>&lt;<a href=\"mailto:notifications@codeplex.com\">notifications@codeplex.com</a>&gt;</span> wrote:<br><blockquote style=\"margin:0pt 0pt 0pt 0.8ex;padding-left:1ex\">\r\n\r\n   <div> <p>From: Cheeso</p> <div><p>Sounds great.</p>\r\n<p>Oh, another thing I noticed.  In your code, you specify the zipfile twice, and differently.   You specify when instantiating the ZipFile object, and also when calling Save().  That really isn't necessary.  Thinking about it now, I don't believe I have any tests that do *that*, and it just may be that it produces a screwy zip file, sometimes.  What I would suggest is that you specify the zipfile name, in one place or the other, but not both.  Either in the constructor, or in the Save() call, but not both. </p>\r\n\r\n\r\n<p>Something like this:</p>\r\n<div style=\"color:Black;background-color:White\">\r\n<pre><span style=\"color:Green\">// create a ZipFile object, with no backing store, just yet</span>\r\n<span style=\"color:Blue\">using</span> (ZipFile zipfile = <span style=\"color:Blue\">new</span> ZipFile())  <span style=\"color:Green\">// &lt;&lt;-- notice: no file name !</span>\r\n{\r\n    <span style=\"color:Green\">// add the sourceFolderContents to the zip file</span>\r\n    zipfile.AddDirectory(sourceFolder,subfoldername);\r\n\r\n    <span style=\"color:Green\">// now, save file in the destination folder</span>\r\n    <span style=\"color:Blue\">var</span> pathToZip = System.IO.Path.Combine(destinationFolder, zipFileName);\r\n    zipfile.Save(pathToZip);\r\n}\r\n\r\n</pre>\r\n</div></div><div> <div> <p>Read the <a href=\"http://dotnetzip.codeplex.com/Thread/View.aspx?ThreadId=73426&ANCHOR#Post250995\">full discussion online</a>.</p> <p>To add a post to this discussion, reply to this email (<a href=\"mailto:DotNetZip@discussions.codeplex.com?subject=[DotNetZip:73426]\">DotNetZip@discussions.codeplex.com</a>)</p>\r\n\r\n <p>To start a new discussion for this project, email <a href=\"mailto:DotNetZip@discussions.codeplex.com\">DotNetZip@discussions.codeplex.com</a></p> <p>You are receiving this email because you subscribed to this discussion on CodePlex. You can <a href=\"http://www.codeplex.com/site/discussions/thread/unsubscribe/73426\">unsubscribe</a> on codePlex.com.</p>\r\n\r\n <p>Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at <a href=\"http://codeplex.com\">codeplex.com</a></p> </div> </div></div> </blockquote>\r\n\r\n</div><br></div> <div> <p>Read the <a href=\"http://dotnetzip.codeplex.com/Thread/View.aspx?ThreadId=73426&ANCHOR#Post251438\">full discussion online</a>.</p> <p>To add a post to this discussion, reply to this email (<a href=\"mailto:DotNetZip@discussions.codeplex.com?subject=[DotNetZip:73426]\">DotNetZip@discussions.codeplex.com</a>)</p>\r\n <p>To start a new discussion for this project, email <a href=\"mailto:DotNetZip@discussions.codeplex.com\">DotNetZip@discussions.codeplex.com</a></p> <p>You are receiving this email because you subscribed to this discussion on CodePlex. You can <a href=\"http://www.codeplex.com/site/discussions/thread/unsubscribe/73426\">unsubscribe</a> on codePlex.com.</p>\r\n <p>Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at <a href=\"http://codeplex.com\">codeplex.com</a></p> </div> </div></div></div>\r\n </blockquote></div><br>",
    "PostedDate": "2009-10-29T20:01:29.763-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "251504",
    "ThreadId": "73426",
    "Html": "<p>DotNetZip should be fine with any valid Windows filename.</p>\r\n<p>Earlier you said it worked in a Console application , but not in ASP.NET.&nbsp; Now you are suggesting the cause is the filenames.&nbsp; Have you tested this?&nbsp; what is the real answer?&nbsp; does it work in ASP.NET or not?&nbsp;</p>\r\n<p>It sounds like you have some testing to do.&nbsp;If I were you, &nbsp;I'd start with the very simple case, and then add complexity as you go.&nbsp;</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2009-10-30T02:15:27.327-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]