Fix issues with the file path in the search results

pull/1/head
yflory 5 years ago
parent ad9a10701d
commit 5136a023f1

@ -750,7 +750,7 @@
}
}
.cp-app-drive-path {
& > .cp-app-drive-path {
width: 100%;
height: @variables_bar-height;
line-height: @variables_bar-height;

@ -2241,6 +2241,7 @@ define([
var isVirtual = virtualCategories.indexOf(path[0]) !== -1;
var el = isVirtual ? undefined : manager.find(path);
path = path[0] === SEARCH ? path.slice(0,1) : path;
var isInTrashRoot = manager.isInTrashRoot(path);
var $outer = $('<div>', {'class': 'cp-app-drive-path'});
var $inner = $('<div>', {'class': 'cp-app-drive-path-inner'});
@ -2251,9 +2252,12 @@ define([
path.forEach(function (p, idx) {
if (skipNext) { skipNext = false; return; }
if (isTrash && [2,3].indexOf(idx) !== -1) { return; }
var name = p;
if (manager.isFile(el) && isInTrashRoot && idx === 1) {
idx = 3;
}
var currentEl = isVirtual ? undefined : manager.find(path.slice(0, idx+1));
if (p === SHARED_FOLDER || (currentEl && manager.isSharedFolder(currentEl))) {
name = manager.getSharedFolderData(currentEl || APP.newSharedFolder).title;
@ -3258,6 +3262,7 @@ define([
$list.append($element);
});
});
setTimeout(collapseDrivePath);
};
var displayRecent = function ($list) {

Loading…
Cancel
Save