]> source.dussan.org Git - nextcloud-server.git/commitdiff
Properly load permissions in showActions 16282/head
authorJulius Härtl <jus@bitgrid.net>
Tue, 18 Jun 2019 10:34:04 +0000 (12:34 +0200)
committerBackportbot <backportbot-noreply@rullzer.com>
Sun, 7 Jul 2019 18:21:05 +0000 (18:21 +0000)
When setViewerMode(false) is called, the permissions should be fetched from the available dirInfo

Signed-off-by: Julius Härtl <jus@bitgrid.net>
apps/files/js/filelist.js

index 2e3f3e2ebb62aca928ed920f2b8fadfbb0ad6aaf..096fe188d196753132898896b7cd79dbb172358f 100644 (file)
                 * @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.