mirror of
https://github.com/denoland/deno.git
synced 2025-07-24 13:44:08 +00:00
fix(npm): skip extracting pax_global_header from tarballs (#15677)
This commit is contained in:
parent
f3a0e48d4e
commit
54be07d05e
20 changed files with 26 additions and 0 deletions
|
@ -123,6 +123,13 @@ fn extract_tarball(data: &[u8], output_folder: &Path) -> Result<(), AnyError> {
|
|||
let mut entry = entry?;
|
||||
let path = entry.path()?;
|
||||
let entry_type = entry.header().entry_type();
|
||||
|
||||
// Some package tarballs contain "pax_global_header", these entries
|
||||
// should be skipped.
|
||||
if entry_type == EntryType::XGlobalHeader {
|
||||
continue;
|
||||
}
|
||||
|
||||
// skip the first component which will be either "package" or the name of the package
|
||||
let relative_path = path.components().skip(1).collect::<PathBuf>();
|
||||
let absolute_path = output_folder.join(relative_path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue