зеркало из https://github.com/mozilla/brackets.git
Code review fixes
This commit is contained in:
Родитель
75bb4b07dd
Коммит
c137309aad
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче