| 623 | } |
| 624 | |
| 625 | static int ZipFile_close_file_func(voidpf opaque, voidpf stream) |
| 626 | { |
| 627 | if (stream == nullptr) |
| 628 | return -1; |
| 629 | |
| 630 | auto* fs = (IFileStream*)stream; |
| 631 | const auto result = fs->close(); // 0 for success, -1 for error |
| 632 | delete fs; |
| 633 | return result; |
| 634 | } |
| 635 | |
| 636 | // THis isn't supported by IFileStream, so just check if the stream is null and open |
| 637 | static int ZipFile_error_file_func(voidpf opaque, voidpf stream) |