summaryrefslogtreecommitdiff
path: root/Userland/Utilities/tar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Utilities/tar.cpp')
-rw-r--r--Userland/Utilities/tar.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/Userland/Utilities/tar.cpp b/Userland/Utilities/tar.cpp
index 09b18146e2..fc98681a84 100644
--- a/Userland/Utilities/tar.cpp
+++ b/Userland/Utilities/tar.cpp
@@ -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);