commit d1230842ac882bbd6456081c474658b293aaf20a (tree)
parent 8087ec8e8c9e3abf8cf2f3952127aa97749610a5
Author: Tobias Simetsreiter <tobias.simetsreiter@wabtec.com>
Date: Tue, 24 Oct 2023 11:35:28 +0200
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
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git 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;
}