From 7e126bd2d59830d8fd35be67311bd19dfdceed22 Mon Sep 17 00:00:00 2001 From: mattseddon <37993418+mattseddon@users.noreply.github.com> Date: Tue, 18 Oct 2022 07:16:45 +1100 Subject: [PATCH] Standardize dvc root paths as they come into the system (#2597) --- extension/src/fileSystem/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extension/src/fileSystem/index.ts b/extension/src/fileSystem/index.ts index cc3f235cd5..6eb7f0cd89 100644 --- a/extension/src/fileSystem/index.ts +++ b/extension/src/fileSystem/index.ts @@ -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' @@ -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 => { @@ -57,7 +58,7 @@ export const findAbsoluteDvcRootPath = async ( return [] } - const absoluteRoot = resolve(cwd, relativePath) + const absoluteRoot = standardizePath(resolve(cwd, relativePath)) as string return [absoluteRoot] }