authorgravatar for xfelix974@gmail.comGungun974 <xfelix974@gmail.com> 2025-05-28 00:57:28+04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-06-06 16:59:40-04:00
log21a0885ae70f1e977b91a63a8b23d705acdac618
treeebdee59fcf0a20c8980111fce74cccc0e4037946
parent98646e5cf8a59e5a7d47eaf863d57ad26313c61c

Make zig fetch handle jar like zip


1 files changed, 4 insertions(+), 0 deletions(-)

src/Package/Fetch.zig+4
...@@ -908,6 +908,7 @@ const FileType = enum {...@@ -908,6 +908,7 @@ const FileType = enum {
908 if (ascii.endsWithIgnoreCase(file_path, ".tzst")) return .@"tar.zst";908 if (ascii.endsWithIgnoreCase(file_path, ".tzst")) return .@"tar.zst";
909 if (ascii.endsWithIgnoreCase(file_path, ".tar.zst")) return .@"tar.zst";909 if (ascii.endsWithIgnoreCase(file_path, ".tar.zst")) return .@"tar.zst";
910 if (ascii.endsWithIgnoreCase(file_path, ".zip")) return .zip;910 if (ascii.endsWithIgnoreCase(file_path, ".zip")) return .zip;
911 if (ascii.endsWithIgnoreCase(file_path, ".jar")) return .zip;
911 return null;912 return null;
912 }913 }
913914
...@@ -1130,6 +1131,9 @@ fn unpackResource(...@@ -1130,6 +1131,9 @@ fn unpackResource(
1130 if (ascii.eqlIgnoreCase(mime_type, "application/zip"))1131 if (ascii.eqlIgnoreCase(mime_type, "application/zip"))
1131 break :ft .zip;1132 break :ft .zip;
11321133
1134 if (ascii.eqlIgnoreCase(mime_type, "application/java-archive"))
1135 break :ft .zip;
1136
1133 if (!ascii.eqlIgnoreCase(mime_type, "application/octet-stream") and1137 if (!ascii.eqlIgnoreCase(mime_type, "application/octet-stream") and
1134 !ascii.eqlIgnoreCase(mime_type, "application/x-compressed"))1138 !ascii.eqlIgnoreCase(mime_type, "application/x-compressed"))
1135 {1139 {