GP-1944 fix zip file entry with empty name, github issue #4128

This commit is contained in:
dev747368
2022-04-19 18:52:52 +00:00
parent c44cf09025
commit ef1672aed0

View File

@@ -18,9 +18,10 @@ package ghidra.file.formats.sevenzip;
import static ghidra.formats.gfilesystem.fileinfo.FileAttributeType.*;
import java.util.*;
import java.io.Closeable;
import java.io.IOException;
import java.util.*;
import org.apache.commons.io.FilenameUtils;
@@ -124,6 +125,9 @@ public class SevenZipFileSystem implements GFileSystem {
// use the name of the 7zip file itself, minus the extension
itemPath = FilenameUtils.getBaseName(fsrl.getContainer().getName());
}
if (itemPath.isEmpty()) {
itemPath = "<blank>";
}
return itemPath;
}