From 20ad3f33d001b4dc8766c4d2a305d9d362d770b2 Mon Sep 17 00:00:00 2001 From: Marcin Date: Tue, 21 Feb 2017 00:38:46 +0000 Subject: Fixed path in other folders search Signed-off-by: Marcin Czarnecki --- apps/files/js/search.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files/js/search.js b/apps/files/js/search.js index fa79d695165..140a66e346d 100644 --- a/apps/files/js/search.js +++ b/apps/files/js/search.js @@ -63,7 +63,7 @@ show size and last modified date on the right */ this.updateLegacyMimetype(result); - var $pathDiv = $('
').text(result.path.substr(1)); + var $pathDiv = $('
').text(result.path.substr(1, result.path.lastIndexOf("/"))); $row.find('td.info div.name').after($pathDiv).text(result.name); $row.find('td.result a').attr('href', result.link); @@ -80,7 +80,7 @@ show size and last modified date on the right */ this.updateLegacyMimetype(result); - var $pathDiv = $('
').text(result.path.substr(1)); + var $pathDiv = $('
').text(result.path.substr(1, result.path.lastIndexOf("/"))); $row.find('td.info div.name').after($pathDiv).text(result.name); $row.find('td.result a').attr('href', result.link); -- cgit v1.2.3