| 1862 | } |
| 1863 | |
| 1864 | int Write_GlobalComment(zip64_internal* zi, const char* global_comment) |
| 1865 | { |
| 1866 | int err = ZIP_OK; |
| 1867 | uInt size_global_comment = 0; |
| 1868 | |
| 1869 | if(global_comment != NULL) |
| 1870 | size_global_comment = (uInt)strlen(global_comment); |
| 1871 | |
| 1872 | err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_global_comment,2); |
| 1873 | |
| 1874 | if (err == ZIP_OK && size_global_comment > 0) |
| 1875 | { |
| 1876 | if (ZWRITE64(zi->z_filefunc,zi->filestream, global_comment, size_global_comment) != size_global_comment) |
| 1877 | err = ZIP_ERRNO; |
| 1878 | } |
| 1879 | return err; |
| 1880 | } |
| 1881 | |
| 1882 | extern int ZEXPORT zipClose (zipFile file, const char* global_comment) |
| 1883 | { |
no test coverage detected