From 51683fa9d1c44e1ce273d87acf6eaddf73b83bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?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=UTF-8 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 753b546b69d86..bfaee261b1114 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1803,7 +1803,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.