SteezCram / PboViewer

Cross-platform PBO maker / unpacker
GNU General Public License v3.0
42 stars 8 forks source link

(In)compatibility with external PBO programs #9

Open Cre8or opened 3 hours ago

Cre8or commented 3 hours ago

Describe the bug PboViewer fails to open some PBO files correctly, specifically ones packed through external programs. I believe this might be related to how the file paths are stored inside the file?

To Reproduce Steps to reproduce the behavior:

  1. Download the sample PBO below
  2. Start PboViewer
  3. Click on "Open PBO"
  4. Select the downloaded PBO and confirm
  5. Notice folder paths are now part of the file names
  6. Scroll to the bottom and open "version.hpp" in a text editor
  7. Notice the file contains incomplete/broken SQF code, and does not match the original file

Expected behavior PboViewer should ideally be compatible with other PBO programs. Currently I am unable to extract PBOs from users on Windows computers (who generally use PBO Manager on their end) as I only have access to PboViewer, being on Linux myself.

Screenshots image

Operating system Arch Linux 6.11.7-arch1-1

Additional context Sample PBO mentioned above

From a quick look, it seems as if the file lengths are correct, but the contents are completely mismatched (each file contains data from a completely different file). I'm also noticing that the file paths use backslashes, which is normal (and expected) for Windows but forbidden on Linux, so maybe part of the reason why it's breaking.

SteezCram commented 3 hours ago

Hello, thanks for reporting a bug. I think this is due to the internal library misreading the headers. I have forked this project https://github.com/Paton7/PBOSharp and modified it a bit. Furthermore, I can solve this by doing two things:

I will do the first things since I do not have much time. But it will be kinda of an ugly fix. I do not know when the problem will be fixed. I have a busy schedule, but I will do it as soon as possible.