| 1848 | } |
| 1849 | |
| 1850 | int Write_GlobalComment(zip64_internal* zi, const char* global_comment) |
| 1851 | { |
| 1852 | int err = ZIP_OK; |
| 1853 | uInt size_global_comment = 0; |
| 1854 | |
| 1855 | if (global_comment != NULL) |
| 1856 | size_global_comment = (uInt)strlen(global_comment); |
| 1857 | |
| 1858 | err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (uLong)size_global_comment, 2); |
| 1859 | |
| 1860 | if (err == ZIP_OK && size_global_comment > 0) |
| 1861 | { |
| 1862 | if (ZWRITE64(zi->z_filefunc,zi->filestream, global_comment, size_global_comment) != size_global_comment) |
| 1863 | err = ZIP_ERRNO; |
| 1864 | } |
| 1865 | return err; |
| 1866 | } |
| 1867 | |
| 1868 | extern int ZEXPORT zipClose(zipFile file, const char* global_comment) |
| 1869 | { |
no test coverage detected