mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:24:57 +00:00
tar: Support extracting symlinks
We can now extract GitHub's LLVM tarballs. :^)
This commit is contained in:
parent
a0c80a6f17
commit
75978d5fff
1 changed files with 10 additions and 0 deletions
|
@ -105,6 +105,16 @@ int main(int argc, char** argv)
|
|||
close(fd);
|
||||
break;
|
||||
}
|
||||
case Archive::TarFileType::SymLink: {
|
||||
Core::File::ensure_parent_directories(absolute_path);
|
||||
|
||||
if (symlink(header.link_name().to_string().characters(), absolute_path.characters())) {
|
||||
perror("symlink");
|
||||
return 1;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case Archive::TarFileType::Directory: {
|
||||
Core::File::ensure_parent_directories(absolute_path);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue