When setViewerMode(false) is called, the permissions should be fetched from the available dirInfo
Signed-off-by: Julius Härtl <jus@bitgrid.net>
* @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.