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

Resource files cannot be found on case-sensitive filesystems. #48

Closed
joshbarrass opened this issue Jun 23, 2023 · 7 comments
Closed

Resource files cannot be found on case-sensitive filesystems. #48

joshbarrass opened this issue Jun 23, 2023 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@joshbarrass
Copy link

joshbarrass commented Jun 23, 2023

When running the latest release on a case-sensitive filesystem, as is typical on Linux, PSXPackager fails to find the default resources files. This is due to PSXPackager searching for Resources/PIC0.png, but the actual file included with the release is Resources/PIC0.PNG. This prevents the file from being found.

A temporary fix is to rename the resource files as any errors occur to match the cases expected by PSXPackager. However, it would be better to handle the cases correctly in the program itself.

Steps:

  • Download and extract v1.6.1 psxpackager-linux-x64.zip to a case-sensitive filesystem, e.g. ext4
  • ./psxpackager -i game.cue -o . -f "%MAINTITLE% [%MAINGAMEID%] (%REGION%)"

Expected results:

PSXPackager runs without error.

Actual results:

Could not find file '/home/user/psxpackager-linux-x64/Resources/PIC0.png'.
@RupertAvery
Copy link
Owner

Thank you for reporting this. I have a solution that involves searching for matching files based on the filename, more or less making the resource file case-insensitive. This works in both Windows and Linux and probably OSX too. This means that if there are more than one of the same filename but with different case, an error will be thrown. I think it unlikely that users will do this.

RupertAvery added a commit that referenced this issue Jul 9, 2023
Do a case-insensitive search for resource files -  #48
Return a non-zero error when exiting after an error occurs - #49
@joshbarrass
Copy link
Author

Just tested the latest build and sadly the error is still there (though the error codes are working now :).

$ ./psxpackager -i game.cue -o . -f "%MAINTITLE% [%MAINGAMEID%] (%REGION%)"
PSXPackager v1.6.2 by RupertAvery

Input : game.cue
Output: .
Compression Level: 5

Processing started: 18:59:31
Processing game.cue
Using Title 'Game Title'

Could not find file '/home/user/psxpackager-linux-x64/Resources/PIC0.png'.
Processing completed: 00h 00m 00s

$ echo $?
253

@RupertAvery
Copy link
Owner

Please try this build and let me know if it fixes the issue

linux-x64.zip

@RupertAvery
Copy link
Owner

Let me know if this is still an issue in v1.6.2

@RupertAvery RupertAvery self-assigned this Sep 8, 2023
@RupertAvery RupertAvery added the bug Something isn't working label Sep 8, 2023
@joshbarrass
Copy link
Author

Apologies, your last reply seems to have slipped through my notifications. I just tried the latest v1.6.2 build on GitHub and am still seeing the same problem.

$ ./psxpackager -i game.cue -o . -f "%MAINTITLE% [%MAINGAMEID%] (%REGION%)"
PSXPackager v1.6.2 by RupertAvery

Input : game.cue
Output: .
Compression Level: 5

Processing started: 14:44:01
Processing game.cue
Using Title 'Game Title'

Could not find file '/home/user/psxpackager-linux-x64/Resources/PIC0.png'.
Processing completed: 00h 00m 00s

$ echo $?
253

@joshbarrass
Copy link
Author

joshbarrass commented Sep 18, 2023

I just tried the build in the zip file you posted above and this appears to fix the problem! :)

I have encountered another bug in the process of testing this, however, but I'll open a separate issue for this.

@takano32
Copy link
Collaborator

Thanks for your report!

And now, I close this ticket.

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

3 participants