| 269 | } |
| 270 | |
| 271 | static void ZipFile_Create(const cc_string* path, struct ResourceZipEntry* entries, int numEntries) { |
| 272 | struct Stream s; |
| 273 | cc_filepath raw_path; |
| 274 | cc_result res; |
| 275 | |
| 276 | Platform_EncodePath(&raw_path, path); |
| 277 | res = Stream_CreatePath(&s, &raw_path); |
| 278 | if (res) { |
| 279 | Logger_IOWarn2(res, "creating", &raw_path); return; |
| 280 | } |
| 281 | |
| 282 | res = ZipFile_WriteEntries(&s, entries, numEntries); |
| 283 | if (res) Logger_IOWarn2(res, "making", &raw_path); |
| 284 | |
| 285 | res = s.Close(&s); |
| 286 | if (res) Logger_IOWarn2(res, "closing", &raw_path); |
| 287 | } |
| 288 | |
| 289 | |
| 290 | #ifdef CC_BUILD_NOMUSIC |
no test coverage detected