1
Fork 0
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:
Tim Schumacher 2021-11-22 21:17:24 +01:00 committed by Andreas Kling
parent a0c80a6f17
commit 75978d5fff

View file

@ -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);