Skip to content

Commit 7e126bd

Browse files
authored
Standardize dvc root paths as they come into the system (#2597)
1 parent d87bf2b commit 7e126bd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

extension/src/fileSystem/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
} from 'fs-extra'
1111
import { load } from 'js-yaml'
1212
import { Uri } from 'vscode'
13+
import { standardizePath } from './path'
1314
import { definedAndNonEmpty } from '../util/array'
1415
import { Logger } from '../common/logger'
1516

@@ -36,7 +37,7 @@ export const findDvcSubRootPaths = async (
3637

3738
return children
3839
.filter(child => isDirectory(join(cwd, child, '.dvc')))
39-
.map(child => join(cwd, child))
40+
.map(child => standardizePath(join(cwd, child)) as string)
4041
}
4142

4243
export const findDvcRootPaths = async (cwd: string): Promise<string[]> => {
@@ -57,7 +58,7 @@ export const findAbsoluteDvcRootPath = async (
5758
return []
5859
}
5960

60-
const absoluteRoot = resolve(cwd, relativePath)
61+
const absoluteRoot = standardizePath(resolve(cwd, relativePath)) as string
6162

6263
return [absoluteRoot]
6364
}

0 commit comments

Comments
 (0)