mirror of
https://github.com/ziglang/zig.git
synced 2026-02-15 05:48:31 +00:00
Make zig fetch handle jar like zip
This commit is contained in:
parent
98646e5cf8
commit
21a0885ae7
@ -908,6 +908,7 @@ const FileType = enum {
|
||||
if (ascii.endsWithIgnoreCase(file_path, ".tzst")) return .@"tar.zst";
|
||||
if (ascii.endsWithIgnoreCase(file_path, ".tar.zst")) return .@"tar.zst";
|
||||
if (ascii.endsWithIgnoreCase(file_path, ".zip")) return .zip;
|
||||
if (ascii.endsWithIgnoreCase(file_path, ".jar")) return .zip;
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -1130,6 +1131,9 @@ fn unpackResource(
|
||||
if (ascii.eqlIgnoreCase(mime_type, "application/zip"))
|
||||
break :ft .zip;
|
||||
|
||||
if (ascii.eqlIgnoreCase(mime_type, "application/java-archive"))
|
||||
break :ft .zip;
|
||||
|
||||
if (!ascii.eqlIgnoreCase(mime_type, "application/octet-stream") and
|
||||
!ascii.eqlIgnoreCase(mime_type, "application/x-compressed"))
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user