Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Folder arguments with a trailing slash break the PBO export #7

Open
Cre8or opened this issue Jul 9, 2024 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@Cre8or
Copy link

Cre8or commented Jul 9, 2024

Describe the bug
Launching PboViewer via command line using a path to a mission folder as argument is bugged. This is a twofold issue:

  • when the mission folder path doesn't end with a slash, PboViewer opens with an empty GUI, seemingly ignoring the folder path argument (minor nuisance, but not catastrophic)
  • when the mission folder path ends with a slash, PboViewer opens the folder properly, but exporting the folder yields a broken .pbo file (missing files/folders, and the first character is trimmed). PboViewer is effectively unuseable when launched this way.

To Reproduce
Steps to reproduce the behavior:
1. Download the attached test mission archive and extract it somewhere (in this example, next to PboViewer)
2. Start your terminal and launch PboViewer with the folder path as argument:

./PboViewer "Test.Altis"

3. Observe that PboViewer starts with an empty GUI:
image
4. Close PboViewer
5. In the terminal, launch PboViewer with the same folder path as argument, but add a trailing slash at the end:

./PboViewer "Test.Altis/"

Observe that PboViewer now opens the folder in the GUI:
image
6. Click "Pack the folder to PBO"
7. Notice that the file name field is empty (it isn't when manually opening a folder in PboViewer and packing to PBO)
8. Enter a name and hit "Save"
9. Close PboViewer
10. Open the exported mission PBO file with PboViewer (not necessarily using the command line this time, though it shouldn't make a difference)
11. Notice that the PBO contains files with incorrect names (first character is trimmed), and contains garbled data (some files are empty, others contain binary data, yet all files were originally text files)
image

Expected behavior

  • Trailing slashes, or the absence thereof, should not have an impact on the behaviour of the program (consistency)
  • PboViewer should suggest the name of the opened folder when exporting to a PBO
  • Exporting to a PBO shouldn't break files (obviously 😛)

Screenshots
Overview of the test mission folder:
image

Operating system
Arch Linux 6.9.8-arch1-1

Additional context
Test mission archive:
Test.Altis.tar.gz

Exported PBO file (renamed to .zip to allow uploading):
Test.Altis.pbo.zip

@Cre8or Cre8or added the bug Something isn't working label Jul 9, 2024
@SteezCram
Copy link
Owner

Hello, sorry for the long reply, that is an interesting bug. I will check on my side. I suspect it comes from the PBO library implementation. I will check that asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants