authorgravatar for dasimmet@gmail.comTobias Simetsreiter <dasimmet@gmail.com> 2023-10-24 11:35:28+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-10-24 13:49:28-04:00
logd1230842ac882bbd6456081c474658b293aaf20a
tree0fb2c4ccf0cb17b52ef3e5d40c7d42f50a01f301
parent8087ec8e8c9e3abf8cf2f3952127aa97749610a5

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

1 files changed, 3 insertions(+), 0 deletions(-)

src/Package/Fetch.zig+3
......@@ -761,8 +761,11 @@ const FileType = enum {
761761
762762 fn fromPath(file_path: []const u8) ?FileType {
763763 if (ascii.endsWithIgnoreCase(file_path, ".tar")) return .tar;
764 if (ascii.endsWithIgnoreCase(file_path, ".tgz")) return .@"tar.gz";
764765 if (ascii.endsWithIgnoreCase(file_path, ".tar.gz")) return .@"tar.gz";
766 if (ascii.endsWithIgnoreCase(file_path, ".txz")) return .@"tar.xz";
765767 if (ascii.endsWithIgnoreCase(file_path, ".tar.xz")) return .@"tar.xz";
768 if (ascii.endsWithIgnoreCase(file_path, ".tzst")) return .@"tar.zst";
766769 if (ascii.endsWithIgnoreCase(file_path, ".tar.zst")) return .@"tar.zst";
767770 return null;
768771 }