pkg tool : file table info

This commit is contained in:
georgemoralis 2023-02-24 16:23:12 +02:00
parent 8ccfcfd553
commit 86ecf77a15
2 changed files with 20 additions and 6 deletions

View file

@ -71,6 +71,7 @@ bool PKG::extract(const std::string& filepath, const std::string& extractPath, s
ReadBE(entry);
//try to figure out the name
std::string name = getEntryNameByType(entry.id);
printPkgFileEntry(entry,name);
if (!name.empty())
{
std::size_t pos = name.find("/");//check if we have a directory (assuming we only have 1 level of subdirectories)
@ -107,10 +108,10 @@ bool PKG::extract(const std::string& filepath, const std::string& extractPath, s
pfs.pfsOuterReadHeader(pkg + pkgheader.pfs_image_offset);
pfs.printPsfOuterHeader();
//extract pfs_image.dat
/*FsFile out;
FsFile out;
out.Open(extractPath + "pfs_image.dat", fsWrite);
out.Write(pkg + pkgheader.pfs_image_offset, pkgheader.pfs_image_size);
out.Close();*/
out.Close();
munmap(pkg);
return true;
}