file_manager: skip broken symlinks in list directory
This resolves an issue where an exception is raised when path info is requested. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
67adcfc448
commit
6fcb26ddd7
|
@ -280,6 +280,8 @@ class FileManager:
|
||||||
flist = {'dirs': [], 'files': []}
|
flist = {'dirs': [], 'files': []}
|
||||||
for fname in os.listdir(path):
|
for fname in os.listdir(path):
|
||||||
full_path = os.path.join(path, fname)
|
full_path = os.path.join(path, fname)
|
||||||
|
if not os.path.exists(full_path):
|
||||||
|
continue
|
||||||
path_info = self._get_path_info(full_path)
|
path_info = self._get_path_info(full_path)
|
||||||
if os.path.isdir(full_path):
|
if os.path.isdir(full_path):
|
||||||
path_info['dirname'] = fname
|
path_info['dirname'] = fname
|
||||||
|
|
Loading…
Reference in New Issue