title: Zip entry name ends in directory separator character but contains data
body: <pre><code>System.IO.Compression.ZipFile.ExtractToDirectory(zipPath, extractPath);
  </code></pre>
  
  <p>Using ZipFile in C#, I'm trying to extract a file from a known location and it is throwing the following error:
  System.IO.Exception: Zip entry name ends in directory separator character but contains data</p>
  
  <p>I've done some research, ExtractToDirectory is explained in MSDN but couldn't find this error definition. Would you be able to explain why this error is happening?</p>
  
  <p>From MSDN:</p>
  
  <p>IOException </p>
  
  <blockquote>
    <p>The directory specified by destinationDirectoryName already exists.</p>
  </blockquote>
  
  <p>-or-</p>
  
  <p>The name of an entry in the archive is Empty, contains only white space, or contains at least one invalid character.</p>
  
  <p>-or-</p>
  
  <blockquote>
    <p>Extracting an archive entry would create a file that is outside the directory specified by destinationDirectoryName. (For example, this might happen if the entry name contains parent directory accessors.)</p>
  </blockquote>
  
  <p>-or-</p>
  
  <blockquote>
    <p>An archive entry to extract has the same name as an entry that has already been extracted from the same archive.</p>
  </blockquote>