fix mode preview with '0' padding

This commit is contained in:
joshuaboud 2021-07-15 13:26:51 -03:00
parent 864a127d4b
commit 2950699694
No known key found for this signature in database
GPG Key ID: 17EFB59E2A8BF50E

View File

@ -340,7 +340,7 @@ export class NavWindow {
update_permissions_preview() {
var new_perms = this.get_new_permissions();
var text = format_permissions(new_perms);
text += " (" + (new_perms & 0o777).toString(8) + ")";
text += " (" + (new_perms & 0o777).toString(8).padStart(3, '0') + ")";
document.getElementById("nav-mode-preview").innerText = text;
this.changed_mode = true;
}