Skip to content

Commit 01d85ed

Browse files
committed
Use path.resolve for normalizing paths
Prefer using path builtin method. Fixes #1181
1 parent 9a9e93a commit 01d85ed

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/common/utils/pathUtils.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,7 @@ function getComparisonKey(uri: Uri): string {
5858
}
5959

6060
export function normalizePath(fsPath: string): string {
61-
const path1 = fsPath.replace(/\\/g, '/');
62-
if (isWindows()) {
63-
return path1.toLowerCase();
64-
}
65-
return path1;
61+
return path.resolve(fsPath);
6662
}
6763

6864
export function getResourceUri(resourcePath: string, root?: string): Uri | undefined {

0 commit comments

Comments
 (0)