Skip to content

unzOpen2_64() when it fails keeps file handle open #461

@jimpark

Description

@jimpark

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!
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixedIssue or bug has been fixed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions