Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
1dab412c
Unverified
Commit
1dab412c
authored
Jan 14, 2024
by
TFWol
Committed by
GitHub
Jan 14, 2024
Browse files
Add error handling to initial fix to keep cache intact
parent
4ab0392f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
folder_paths.py
folder_paths.py
+7
-0
No files found.
folder_paths.py
View file @
1dab412c
...
@@ -139,6 +139,13 @@ def recursive_search(directory, excluded_dir_names=None):
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment