Merge remote-tracking branch 'origin/GP-5225_dev747368_fix_fail_to_close_file.zip'

This commit is contained in:
Ryan Kurtz 2025-01-02 03:57:38 -05:00
commit d65fd1f9f9

View file

@ -32,8 +32,8 @@ public class ZipFileSystemFactory
* Use "-Dghidra.file.formats.zip.ZipFileSystemFactory.USE_BUILTIN_ZIP_SUPPORT=true" jvm
* startup option to disable use of 7zip libraries when opening zip filesystems.
*/
private static boolean USE_BUILTIN_ZIP_SUPPORT = Boolean
.getBoolean("ghidra.file.formats.zip.ZipFileSystemFactory.USE_BUILTIN_ZIP_SUPPORT");
private static boolean USE_BUILTIN_ZIP_SUPPORT =
Boolean.getBoolean("ghidra.file.formats.zip.ZipFileSystemFactory.USE_BUILTIN_ZIP_SUPPORT");
private static final int START_BYTES_REQUIRED = 2;
@ -84,6 +84,7 @@ public class ZipFileSystemFactory
ZipFileSystemBuiltin.TEMPFILE_PREFIX, monitor);
deleteZipFileWhenDone = true;
}
FSUtilities.uncheckedClose(byteProvider, null);
ZipFileSystemBuiltin fs = new ZipFileSystemBuiltin(targetFSRL, fsService);
try {
fs.mount(zipFile, deleteZipFileWhenDone, monitor);