summaryrefslogtreecommitdiffstats
path: root/apps/comments
diff options
context:
space:
mode:
Diffstat (limited to 'apps/comments')
-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',