Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/rustup-dist/src/component/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,14 @@ fn unpack_without_first_dir<R: Read>(archive: &mut tar::Archive<R>, path: &Path)
// Throw away the first path component
components.next();
let full_path = path.join(&components.as_path());

// Create the full path to the entry if it does not exist already
match full_path.parent() {
Some(parent) if !parent.exists() =>
try!(::std::fs::create_dir_all(&parent).chain_err(|| ErrorKind::ExtractingPackage)),
_ => (),
};

try!(entry.unpack(&full_path).chain_err(|| ErrorKind::ExtractingPackage));
}

Expand Down