mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-30 16:33:06 +08:00
GP-5707 fix getinfo FSB action project index
Also tweak tar filename info string
This commit is contained in:
+3
-2
@@ -21,6 +21,7 @@ import java.io.IOException;
|
||||
|
||||
import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
|
||||
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
|
||||
import ghidra.app.util.bin.ByteProvider;
|
||||
import ghidra.formats.gfilesystem.*;
|
||||
@@ -112,7 +113,7 @@ public class TarFileSystem extends AbstractFileSystem<TarMetadata> {
|
||||
}
|
||||
TarArchiveEntry blob = tmd.tarArchiveEntry;
|
||||
return FileAttributes.of(
|
||||
FileAttribute.create(NAME_ATTR, blob.getName()),
|
||||
FileAttribute.create(NAME_ATTR, FilenameUtils.getName(blob.getName())),
|
||||
FileAttribute.create(SIZE_ATTR, blob.getSize()),
|
||||
FileAttribute.create(MODIFIED_DATE_ATTR, blob.getLastModifiedDate()),
|
||||
FileAttribute.create(FILE_TYPE_ATTR, tarToFileType(blob)),
|
||||
@@ -155,7 +156,7 @@ public class TarFileSystem extends AbstractFileSystem<TarMetadata> {
|
||||
|
||||
int fileNum = 0;
|
||||
TarArchiveEntry tarEntry;
|
||||
while ((tarEntry = tarInput.getNextTarEntry()) != null) {
|
||||
while ((tarEntry = tarInput.getNextEntry()) != null) {
|
||||
if (fileNum == tmd.fileNum) {
|
||||
if (!tmd.tarArchiveEntry.getName().equals(tarEntry.getName())) {
|
||||
throw new IOException(
|
||||
|
||||
Reference in New Issue
Block a user