[ https://issues.apache.org/jira/browse/HDFS-5921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13896919#comment-13896919 ]
Haohui Mai commented on HDFS-5921: ---------------------------------- {code} + var otherExec = ((ctx.current().permission % 10) & 1) == 1; + res = res.slice(0, res.length - 1) + (otherExec ? 't' : 'T'); {code} You probably want to use {{substr}} instead of {{slice}}, as {{substr}} usually performs better than {{slice}} in this use case. (http://jsperf.com/string-slice-vs-substr). Here is an example: {code} var exec = ((ctx.current().permission % 10) & 1) == 1; res = res.substr(0, res.length - 1) + (exec ? 't' : 'T'); {code} > Cannot browse file system via NN web UI if any directory has the sticky bit > set > ------------------------------------------------------------------------------- > > Key: HDFS-5921 > URL: https://issues.apache.org/jira/browse/HDFS-5921 > Project: Hadoop HDFS > Issue Type: Bug > Components: namenode > Affects Versions: 2.3.0 > Reporter: Aaron T. Myers > Assignee: Aaron T. Myers > Priority: Critical > Attachments: HDFS-5921.patch > > > You'll see an error like this in the JS console if any directory has the > sticky bit set: > {noformat} > 'helper_to_permission': function(chunk, ctx, bodies, params) { > .... > var exec = ((parms.perm % 10) & 1) == 1; > Uncaught ReferenceError: parms is not defined > {noformat} -- This message was sent by Atlassian JIRA (v6.1.5#6160)