Commit d1230842ac

Tobias Simetsreiter <tobias.simetsreiter@wabtec.com>
2023-10-24 11:35:28
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 parent 8087ec8
Changed files (1)
src
Package
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;
     }