From 36cf77914069cd63b4d70d2ca0658f9000cddf78 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Mon, 10 Oct 2016 11:57:16 +0200 Subject: the root folder must not be shared Signed-off-by: Christoph Wurst --- apps/files_sharing/js/sharebreadcrumbview.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'apps/files_sharing/js') diff --git a/apps/files_sharing/js/sharebreadcrumbview.js b/apps/files_sharing/js/sharebreadcrumbview.js index 9803c8f6dea..c6bf365ba07 100644 --- a/apps/files_sharing/js/sharebreadcrumbview.js +++ b/apps/files_sharing/js/sharebreadcrumbview.js @@ -43,12 +43,17 @@ render: function(data) { this._dirInfo = data.dirInfo; - var isShared = data.dirInfo && data.dirInfo.shareTypes && data.dirInfo.shareTypes.length > 0; - - this.$el.html(this.template({ - isShared: isShared - })); - this.delegateEvents(); + if (this._dirInfo !== null && (this._dirInfo.path !== '/' || this._dirInfo.name !== '')) { + var isShared = data.dirInfo && data.dirInfo.shareTypes && data.dirInfo.shareTypes.length > 0; + this.$el.html(this.template({ + isShared: isShared + })); + this.$el.show(); + this.delegateEvents(); + } else { + this.$el.empty(); + this.$el.hide(); + } return this; }, -- cgit v1.2.3