godotengine / godot-vscode-plugin

Godot development tools for VSCode
MIT License
1.6k stars 170 forks source link

Capitalize the drive letter in windows absolute paths #727

Closed DaelonSuzuka closed 2 months ago

DaelonSuzuka commented 2 months ago

RE: #726

@KoBeWi please grab the CI build and let me know if this solves your problem

KoBeWi commented 2 months ago

It solves the problem, but looks like a hack. Why is projectDir like that?

DaelonSuzuka commented 2 months ago

I don't understand the question. Why is projectDir like what?

KoBeWi commented 2 months ago

Like wrong. Windows always uses capitalized drive letters, so I don't get where the small drive letter came from. That would be the true source of this bug.

DaelonSuzuka commented 2 months ago

path.dirname() is from the Node standard library, and apparently it returns Windows paths with a lower case drive letter. What is it you're expecting me to do about that except fix the return value?

KoBeWi commented 2 months ago

Ah so it's just some Node weirdness.

What is it you're expecting me to do about that except fix the return value?

I was mostly curious, because it looks like bandaid fix. But if the problem is standard library then it's the only way I guess.

DaelonSuzuka commented 2 months ago

Ah so it's just some Node weirdness.

Pretty much. It preserves the case in the rest of the path, for some reason: ie it doesn't lower the path part of p:/SkyknightsOnline on my machine, just the drive letter.