Skip to content

Commit

Permalink
Standardize dvc root paths as they come into the system (#2597)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattseddon authored Oct 17, 2022
1 parent d87bf2b commit 7e126bd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions extension/src/fileSystem/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
} from 'fs-extra'
import { load } from 'js-yaml'
import { Uri } from 'vscode'
import { standardizePath } from './path'
import { definedAndNonEmpty } from '../util/array'
import { Logger } from '../common/logger'

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

return children
.filter(child => isDirectory(join(cwd, child, '.dvc')))
.map(child => join(cwd, child))
.map(child => standardizePath(join(cwd, child)) as string)
}

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

const absoluteRoot = resolve(cwd, relativePath)
const absoluteRoot = standardizePath(resolve(cwd, relativePath)) as string

return [absoluteRoot]
}
Expand Down

0 comments on commit 7e126bd

Please sign in to comment.