mirror of
https://github.com/ziglang/zig.git
synced 2026-01-07 05:55:36 +00:00
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
This commit is contained in:
parent
8087ec8e8c
commit
d1230842ac
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user