summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-12-24 14:20:24 +0100
committerGitHub <noreply@github.com>2018-12-24 14:20:24 +0100
commit027f69df3f669df1d30f0dc32f7c29b9f4603ed8 (patch)
treeb52f205da9fee225c32b23dd0f2176f969772dbd /apps
parent39131eee3e118dc8139981d2270af02f4141bfc4 (diff)
parentbc74a44cbc7ce5b80e66d5b68eb32b50d1357950 (diff)
downloadnextcloud-server-027f69df3f669df1d30f0dc32f7c29b9f4603ed8.tar.gz
nextcloud-server-027f69df3f669df1d30f0dc32f7c29b9f4603ed8.zip
Merge pull request #13227 from nextcloud/fix-opening-search-results-for-comments
Fix opening search results for comments
Diffstat (limited to 'apps')
-rw-r--r--apps/comments/js/search.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/comments/js/search.js b/apps/comments/js/search.js
index 11a96594580..8e0a35ff6ed 100644
--- a/apps/comments/js/search.js
+++ b/apps/comments/js/search.js
@@ -92,7 +92,9 @@
.css('background-image', 'url(' + OC.imagePath('core', 'actions/comment') + ')')
.css('opacity', '.4');
var dir = OC.dirname(result.path);
- if (dir === '') {
+ // "result.path" does not include a leading "/", so "OC.dirname"
+ // returns the path itself for files or folders in the root.
+ if (dir === result.path) {
dir = '/';
}
$row.find('td.info a').attr('href',