From 3c4f11a9101a7bd83d1524ee90e5760d985e53a8 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 4967d0cd5a..3945877b42 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1692,7 +1692,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.