mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-11 09:08:43 +08:00
Fix file name completions when file name is too long
This commit is contained in:
@@ -33,7 +33,8 @@ def file_name_completions(inference_state, module_context, start_leaf, string,
|
|||||||
base_path = os.path.join(inference_state.project._path, string)
|
base_path = os.path.join(inference_state.project._path, string)
|
||||||
try:
|
try:
|
||||||
listed = scandir(base_path)
|
listed = scandir(base_path)
|
||||||
except FileNotFoundError:
|
# OSError: [Errno 36] File name too long: '...'
|
||||||
|
except (FileNotFoundError, OSError):
|
||||||
return
|
return
|
||||||
for entry in listed:
|
for entry in listed:
|
||||||
name = entry.name
|
name = entry.name
|
||||||
|
|||||||
Reference in New Issue
Block a user