microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.73k stars 29.09k forks source link

extUri.relativePath returns wrong value if the path has UTF characters #174693

Open sandy081 opened 1 year ago

sandy081 commented 1 year ago
const actual = path.win32.relative('C:\\Users\\İ\\.vscode-insiders\\extensions', 'C:\\Users\\İ\\.vscode-insiders\\extensions\\ms-vscode.cpptools-1.14.3-win32-x64');
        assert.strictEqual(actual, 'ms-vscode.cpptools-1.14.3-win32-x64');
bpasero commented 1 year ago

Relevant upstream issue: https://github.com/nodejs/node/issues/27534 And suggested PR: https://github.com/nodejs/node/pull/27662

I am not entirely convinced we should take a change here that was not accepted in node.js. We try to stay identical to node.js behaviour with our path library for good reason so that there is identical interop.

I would close this "as designed".

BridgeAR commented 2 months ago

It just got fixed in Node.js and should be released soon in newer versions