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

string match fails when Windows drive letter is lowercase #12

Open
PeterWone opened this issue Mar 11, 2023 · 1 comment
Open

string match fails when Windows drive letter is lowercase #12

PeterWone opened this issue Mar 11, 2023 · 1 comment

Comments

@PeterWone
Copy link

Paths returned by VS Code APIs may have lowercase drive letters on Windows. As StartsWith is case sensitive the logic fails. It's such short code I just rewrote it in Typescript and fixed my local copy.

	if (normalizedPath[1] === ":") {
		//force first char to uppercase
		normalizedPath = normalizedPath.replace(normalizedPath[0], normalizedPath[0].toUpperCase());
	}
@sindresorhus
Copy link
Owner

I'm using path.normalize which is supposed to normalise the path, so this seems like an issue you need to open with Node.js.

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

No branches or pull requests

2 participants