Fix issue with the path for the trash in the drive's topbar

This commit is contained in:
yflory 2017-02-27 18:37:44 +01:00
parent 8741b50f5b
commit 4f7a05ead2
1 changed files with 4 additions and 2 deletions

View File

@ -865,13 +865,15 @@ define([
return $title;
}
path.forEach(function (p, idx) {
if (isTrash && [1,2].indexOf(idx) !== -1) { return; }
if (isTrash && [2,3].indexOf(idx) !== -1) { return; }
var $span = $('<span>', {'class': 'element'});
if (idx < path.length - 1) {
$span.addClass('clickable');
$span.click(function (e) {
module.displayDirectory(path.slice(0, idx + 1));
var sliceEnd = idx + 1;
if (isTrash && idx === 1) { sliceEnd = 4; } // Make sure we don't show the index or 'element' and 'path'
module.displayDirectory(path.slice(0, sliceEnd));
});
}