Skip to content

Commit

Permalink
fix(elan-dist): ZipArchive: don't create directories as files
Browse files Browse the repository at this point in the history
  • Loading branch information
Kha committed Apr 12, 2018
1 parent 4cabdfe commit 69e9887
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/elan-dist/src/component/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ impl<'a> ZipPackage<'a> {
fn unpack_without_first_dir<R: Read + Seek>(archive: &mut ZipArchive<R>, path: &Path) -> Result<()> {
for i in 0..archive.len() {
let mut entry = archive.by_index(i).chain_err(|| ErrorKind::ExtractingPackage)?;
if entry.name().ends_with('/') {
continue // skip directories
}
let relpath = PathBuf::from(entry.name());
let mut components = relpath.components();
// Throw away the first path component
Expand Down

0 comments on commit 69e9887

Please sign in to comment.