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

This commit is contained in:
Benjamin Pasero
2016-05-31 12:54:35 +02:00
parent f760d96416
commit 747ae8bfac

View File

@@ -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);
}