提交 1655a6ad 编写于 作者: D Daniel Imms

Use paths

上级 f9721fd7
......@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import * as os from 'os';
import * as path from 'path';
import * as paths from 'vs/base/common/paths';
import * as platform from 'vs/base/common/platform';
import pkg from 'vs/platform/node/package';
import Uri from 'vs/base/common/uri';
......@@ -134,10 +134,10 @@ export function getCwd(shell: IShellLaunchConfig, root: Uri, configHelper: ITerm
// Evaluate custom cwd first
const customCwd = configHelper.config.cwd;
if (customCwd) {
if (path.isAbsolute(customCwd)) {
if (paths.isAbsolute(customCwd)) {
cwd = customCwd;
} else if (root) {
cwd = path.normalize(path.join(root.fsPath, customCwd));
cwd = paths.normalize(paths.join(root.fsPath, customCwd));
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册