We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 085a23b + 09013e4 commit 456fa8bCopy full SHA for 456fa8b
src/dist/component/package.rs
@@ -332,10 +332,12 @@ fn unpack_without_first_dir<'a, R: Read>(
332
let path = path.chain_err(|| ErrorKind::ExtractingPackage)?;
333
path.into_owned()
334
};
335
- // Reject path components that are not normal (.|..|/| etc)
+ // Reject path components that are not normal (..|/| etc)
336
for part in relpath.components() {
337
match part {
338
- std::path::Component::Normal(_) => {}
+ // Some very early rust tarballs include a "." segment which we have to
339
+ // support, despite not liking it.
340
+ std::path::Component::Normal(_) | std::path::Component::CurDir => {}
341
_ => return Err(ErrorKind::BadPath(relpath).into()),
342
}
343
0 commit comments