Skip to content

Fix locale-dependent regex bug in BSR_INSTALL path parsing - #37

Closed
LisanAlGaib-Mahdi wants to merge 2 commits into
Jordan231111:mainfrom
LisanAlGaib-Mahdi:main
Closed

LisanAlGaib-Mahdi wants to merge 2 commits into
Jordan231111:mainfrom
LisanAlGaib-Mahdi:main

Conversation

@LisanAlGaib-Mahdi

Copy link
Copy Markdown

Changed -match to -cmatch for the BSR_INSTALL regex in Resolve-LauncherPaths.

On certain regional Windows locales, PowerShell's case-insensitive -match converts the uppercase "I" incorrectly. Because this converted character is not in the [A-Z] range, the regex fails and breaks the root process by returning an empty path.

Making it case-sensitive with -cmatch is a safe, simple fix that solves this issue permanently for all international users without affecting the rest of the script.

Note on the commit:
Since blueStackRoot.cmd is too large to be edited directly via GitHub's web editor, I had to download it, apply the fix locally on my PC, delete the old file from my fork, and upload the modified version. This is why the commit might appear as a full file replacement rather than a simple 1-line edit, but the only actual code change is the -match to -cmatch modification.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants