From 4f7a05ead263d83295dbf1892d440fd7df7d3b23 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 27 Feb 2017 18:37:44 +0100 Subject: [PATCH] Fix issue with the path for the trash in the drive's topbar --- www/drive/main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/www/drive/main.js b/www/drive/main.js index 9a2a97b14..a98b9208a 100644 --- a/www/drive/main.js +++ b/www/drive/main.js @@ -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 = $('', {'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)); }); }