pull changes from main

This commit is contained in:
joshuaboud 2021-06-29 13:40:08 -03:00
parent 2603065cf0
commit 131b75a10b
No known key found for this signature in database
GPG Key ID: 17EFB59E2A8BF50E
2 changed files with 4 additions and 29 deletions

View File

@ -232,12 +232,8 @@ class NavEntry {
this.dom_element.appendChild(icon);
this.dom_element.appendChild(title);
this.stat = stat;
if (stat && stat["inaccessible"]) {
this.dom_element.style.cursor = "not-allowed";
} else {
this.dom_element.addEventListener("click", this);
this.dom_element.addEventListener("contextmenu", this);
}
this.dom_element.addEventListener("click", this);
this.dom_element.addEventListener("contextmenu", this);
this.is_hidden_file = this.filename().startsWith('.');
if (this.is_hidden_file)
icon.style.opacity = 0.5;
@ -1561,7 +1557,7 @@ class NavWindow {
[start, end] = [end, start];
if (end === -1)
return;
to_be_selected = this.entries.slice(start, end + 1).filter(entry => !entry.stat["inaccessible"]);
to_be_selected = this.entries.slice(start, end + 1);
} else {
if (!append)
this.selected_entries.clear();

View File

@ -25,27 +25,7 @@ from pwd import getpwuid
from grp import getgrgid
def get_stat(full_path, filename = '/'):
try:
stats = os.lstat(full_path)
except OSError:
return {
"filename": filename,
"isdir": False,
"link-target": "",
"stat": {
"inaccessible": True,
"mode": 0,
"mode-str": "?",
"uid": 0,
"owner": "?",
"gid": 0,
"group": "?",
"size": 0,
"atime": 0,
"mtime": 0,
"ctime": 0
}
}
stats = os.lstat(full_path)
isdir = False
try:
isdir = S_ISDIR(os.stat(full_path).st_mode)
@ -65,7 +45,6 @@ def get_stat(full_path, filename = '/'):
except:
pass
response = {
"inaccessible": False,
"filename": filename,
"isdir": isdir,
"link-target": link_target,