Merge remote-tracking branch 'origin/GP-5938_dev747368_sevenzip_bz2_getsize_npe'

This commit is contained in:
Ryan Kurtz 2025-09-04 06:10:06 -04:00
commit f501ffccd2

View file

@ -401,8 +401,9 @@ public class SevenZipFileSystem extends AbstractFileSystem<ISimpleInArchiveItem>
// In our case, we only handle extract operations. // In our case, we only handle extract operations.
if (!currentItem.isFolder() && extractAskMode == ExtractAskMode.EXTRACT) { if (!currentItem.isFolder() && extractAskMode == ExtractAskMode.EXTRACT) {
try { try {
currentCacheEntryBuilder = fsService.createTempFile(currentItem.getSize()); long size = Objects.requireNonNullElse(currentItem.getSize(), -1L);
monitor.initialize(currentItem.getSize(), "Extracting " + currentName); currentCacheEntryBuilder = fsService.createTempFile(size);
monitor.initialize(size, "Extracting " + currentName);
} }
catch (IOException e) { catch (IOException e) {
throw new SevenZipException(e); throw new SevenZipException(e);