diff --git a/Zip/Zip.swift b/Zip/Zip.swift index 544e30082e22b604d0a4d34ae9e0f75441dd8eba..44d034e8d96d5382a425468a2593bd38e3e1580d 100644 --- a/Zip/Zip.swift +++ b/Zip/Zip.swift @@ -199,7 +199,8 @@ public class Zip { } } - fclose(filePointer) + if let fp = filePointer { fclose(fp) } + crc_ret = unzCloseCurrentFile(zip) if crc_ret == UNZ_CRCERROR { throw ZipError.unzipFail