Using unzOpen2_64() with fill_win32_filefunc64() on a file that is not a Zip file causes the file to stay opened. Another process cannot delete the file. The problem is likely with fill_win32_filefunc64().
The issue is on Windows 10.
zlib_filefunc64_def ffunc;
fill_win32_filefunc64(&ffunc);
auto uzf = unzOpen2_64(path.c_str(), &ffunc);
if (uzf == nullptr) {
return false; // The file handle to path is still open!
}
Using
unzOpen2_64()withfill_win32_filefunc64()on a file that is not a Zip file causes the file to stay opened. Another process cannot delete the file. The problem is likely withfill_win32_filefunc64().The issue is on Windows 10.