]> source.dussan.org Git - nextcloud-server.git/commitdiff
the root folder must not be shared
authorChristoph Wurst <christoph@winzerhof-wurst.at>
Mon, 10 Oct 2016 09:57:16 +0000 (11:57 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Mon, 7 Nov 2016 13:58:45 +0000 (14:58 +0100)
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
apps/files_sharing/js/sharebreadcrumbview.js

index 9803c8f6dea741665df944675513cf6578d5c977..c6bf365ba070b15de4f7bf656b5d85af65aede6a 100644 (file)
                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;
                },