mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-11 02:15:17 +00:00
Add error handling to initial fix to keep cache intact
This commit is contained in:
parent
4ab0392f70
commit
1dab412c79
@ -139,6 +139,13 @@ def recursive_search(directory, excluded_dir_names=None):
|
|||||||
|
|
||||||
result = []
|
result = []
|
||||||
dirs = {}
|
dirs = {}
|
||||||
|
|
||||||
|
# Attempt to add the initial directory to dirs with error handling
|
||||||
|
try:
|
||||||
|
dirs[directory] = os.path.getmtime(directory)
|
||||||
|
except FileNotFoundError:
|
||||||
|
print(f"Warning: Unable to access {directory}. Skipping this path.")
|
||||||
|
|
||||||
for dirpath, subdirs, filenames in os.walk(directory, followlinks=True, topdown=True):
|
for dirpath, subdirs, filenames in os.walk(directory, followlinks=True, topdown=True):
|
||||||
subdirs[:] = [d for d in subdirs if d not in excluded_dir_names]
|
subdirs[:] = [d for d in subdirs if d not in excluded_dir_names]
|
||||||
for file_name in filenames:
|
for file_name in filenames:
|
||||||
|
Loading…
Reference in New Issue
Block a user