mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 02:44:43 +01:00
Make zig fetch handle jar like zip
This commit is contained in:
parent
98646e5cf8
commit
21a0885ae7
1 changed files with 4 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue