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

Network folder paths are not correctly normalized for games.js (at least by old thcrap_configure) #214

Open
Dobby233Liu opened this issue Apr 29, 2023 · 2 comments

Comments

@Dobby233Liu
Copy link

Dobby233Liu commented Apr 29, 2023

To reproduce this issue:

  • Make a network folder with a Touhou game in it
  • Make old thcrap_configure scan for games in that folder and generate configurations

Then observe that in games.js, the paths to the game executables in your network folder are written in the form of //host/path, e.g.:

{
  "th08": "//vmware-host/Shared Folders/beast/Touhou 8 - Imperishable Night/vpatch.exe",
  "th08_custom": "//vmware-host/Shared Folders/beast/Touhou 8 - Imperishable Night/custom.exe"
}

But the host part in the paths should really be written in the form of \\host, and without editing games.js to something like the below:

{
  "th08": "\\\\vmware-host/Shared Folders/beast/Touhou 8 - Imperishable Night/vpatch.exe",
  "th08_custom": "\\\\vmware-host/Shared Folders/beast/Touhou 8 - Imperishable Night/custom.exe"
}

thcrap_loader will fail to start the executables with bad paths, with the following error:
image

Failed to start <thcrap path>\<executable path>
The system cannot find the path specified.
@brliron
Copy link
Member

brliron commented Apr 29, 2023

A possible fix would be to add a special case in str_slash_normalize ensuring that network paths start with \\ instead of //

@DankRank
Copy link
Member

As a temporary workaround you can map the network drive to give it a drive letter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants