diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2016-10-10 11:57:16 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-11-07 14:58:45 +0100 |
commit | 36cf77914069cd63b4d70d2ca0658f9000cddf78 (patch) | |
tree | 66db1a009beed3f7aa94dd3bef140efcf72bfc07 /apps/files_sharing/js | |
parent | 5bf7e5533d79c98d720d92ecee0125938805ff0f (diff) | |
download | nextcloud-server-36cf77914069cd63b4d70d2ca0658f9000cddf78.tar.gz nextcloud-server-36cf77914069cd63b4d70d2ca0658f9000cddf78.zip |
the root folder must not be shared
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/files_sharing/js')
-rw-r--r-- | apps/files_sharing/js/sharebreadcrumbview.js | 17 |
1 files changed, 11 insertions, 6 deletions
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; }, |