From 57688ce6736fc1c24d0bd969a9caf1dd7cc9c799 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Julius=20H=C3=A4rtl?= Date: Tue, 18 Jun 2019 12:34:04 +0200 Subject: [PATCH] Properly load permissions in showActions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When setViewerMode(false) is called, the permissions should be fetched from the available dirInfo Signed-off-by: Julius Härtl --- apps/files/js/filelist.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 2e3f3e2ebb6..096fe188d19 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1805,7 +1805,7 @@ * @return permission value as integer */ getDirectoryPermissions: function() { - return parseInt(this.$el.find('#permissions').val(), 10); + return this && this.dirInfo && this.dirInfo.permissions ? this.dirInfo.permissions : parseInt(this.$el.find('#permissions').val(), 10); }, /** * Changes the current directory and reload the file list. -- 2.39.5