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())
|
||||
):
|
||||
permissions = "r"
|
||||
if self.check_reserved_path(real_path, permissions == "rw", False):
|
||||
for name, (res_path, can_read) in self.reserved_paths.items():
|
||||
if (res_path == real_path or res_path in real_path.parents):
|
||||
if not can_read:
|
||||
permissions = ""
|
||||
break
|
||||
permissions = "r"
|
||||
return {
|
||||
'modified': fstat.st_mtime,
|
||||
'size': fstat.st_size,
|
||||
|
|
Loading…
Reference in New Issue