提交 747ae8bf 编写于 作者: B Benjamin Pasero

adopt path.normalize() change now returning "." when passing in empty string

上级 f760d964
......@@ -41,6 +41,10 @@ export function getPathLabel(arg1: uri|string, arg2?: uri|string|IWorkspaceProvi
let absolutePath = getPath(arg1);
if (basepath && paths.isEqualOrParent(absolutePath, basepath)) {
if (basepath === absolutePath) {
return ''; // no label if pathes are identical
}
return paths.normalize(strings.ltrim(absolutePath.substr(basepath.length), paths.nativeSep), true);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册