From d1230842ac882bbd6456081c474658b293aaf20a Mon Sep 17 00:00:00 2001 From: Tobias Simetsreiter Date: Tue, 24 Oct 2023 11:35:28 +0200 Subject: [PATCH] add Fetch support for short compressed tar ext these short extensions are common in a lot of places, and should be treated like their double versions --- src/Package/Fetch.zig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Package/Fetch.zig b/src/Package/Fetch.zig index c10008aa16..a61c420cb2 100644 --- a/src/Package/Fetch.zig +++ b/src/Package/Fetch.zig @@ -761,8 +761,11 @@ const FileType = enum { fn fromPath(file_path: []const u8) ?FileType { if (ascii.endsWithIgnoreCase(file_path, ".tar")) return .tar; + if (ascii.endsWithIgnoreCase(file_path, ".tgz")) return .@"tar.gz"; if (ascii.endsWithIgnoreCase(file_path, ".tar.gz")) return .@"tar.gz"; + if (ascii.endsWithIgnoreCase(file_path, ".txz")) return .@"tar.xz"; if (ascii.endsWithIgnoreCase(file_path, ".tar.xz")) return .@"tar.xz"; + if (ascii.endsWithIgnoreCase(file_path, ".tzst")) return .@"tar.zst"; if (ascii.endsWithIgnoreCase(file_path, ".tar.zst")) return .@"tar.zst"; return null; }