file_manager: fix permission reporting
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
36536535bc
commit
d490796da9
|
@ -549,8 +549,12 @@ class FileManager:
|
||||||
(path.is_symlink() and path.is_file())
|
(path.is_symlink() and path.is_file())
|
||||||
):
|
):
|
||||||
permissions = "r"
|
permissions = "r"
|
||||||
if self.check_reserved_path(real_path, permissions == "rw", False):
|
for name, (res_path, can_read) in self.reserved_paths.items():
|
||||||
permissions = ""
|
if (res_path == real_path or res_path in real_path.parents):
|
||||||
|
if not can_read:
|
||||||
|
permissions = ""
|
||||||
|
break
|
||||||
|
permissions = "r"
|
||||||
return {
|
return {
|
||||||
'modified': fstat.st_mtime,
|
'modified': fstat.st_mtime,
|
||||||
'size': fstat.st_size,
|
'size': fstat.st_size,
|
||||||
|
|
Loading…
Reference in New Issue