Use fsPath over path for terminal cwd

This commit is contained in:
Daniel Imms 2018-06-14 11:18:34 +02:00
parent 477e918451
commit a87e828050

View file

@ -136,14 +136,14 @@ export function getCwd(shell: IShellLaunchConfig, root: Uri, configHelper: ITerm
if (paths.isAbsolute(customCwd)) { if (paths.isAbsolute(customCwd)) {
cwd = customCwd; cwd = customCwd;
} else if (root) { } else if (root) {
cwd = paths.normalize(paths.join(root.path, customCwd)); cwd = paths.normalize(paths.join(root.fsPath, customCwd));
} }
} }
} }
// If there was no custom cwd or it was relative with no workspace // If there was no custom cwd or it was relative with no workspace
if (!cwd) { if (!cwd) {
cwd = root ? root.path : os.homedir(); cwd = root ? root.fsPath : os.homedir();
} }
return _sanitizeCwd(cwd); return _sanitizeCwd(cwd);