This commit is contained in:
Narciso Jaramillo 2012-09-13 17:34:35 -07:00
Родитель 75bb4b07dd
Коммит c137309aad
1 изменённых файлов: 18 добавлений и 10 удалений

Просмотреть файл

@ -77,6 +77,14 @@ define(function (require, exports, module) {
*/
var _projectTree = null;
function canonicalize(path) {
if (path.length > 0 && path[path.length - 1] === "/") {
return path.slice(0, -1);
} else {
return path;
}
}
/**
* @private
* Reference to previous selected jstree leaf node when ProjectManager had
@ -264,7 +272,7 @@ define(function (require, exports, module) {
fullPath = entry.fullPath;
// Truncate project path prefix, remove the trailing slash
shortPath = FileUtils.canonicalizeFolderPath(fullPath);
shortPath = fullPath.slice(projectPathLength, -1);
// Determine depth of the node by counting path separators.
// Children at the root have depth of zero