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
ef5a28b5
Commit
ef5a28b5
authored
Jan 20, 2024
by
comfyanonymous
Browse files
Merge branch 'patch-1' of
https://github.com/TFWol/ComfyUI
parents
5823f18a
1dab412c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
folder_paths.py
folder_paths.py
+14
-2
No files found.
folder_paths.py
View file @
ef5a28b5
...
...
@@ -138,15 +138,27 @@ def recursive_search(directory, excluded_dir_names=None):
excluded_dir_names
=
[]
result
=
[]
dirs
=
{
directory
:
os
.
path
.
getmtime
(
directory
)}
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
):
subdirs
[:]
=
[
d
for
d
in
subdirs
if
d
not
in
excluded_dir_names
]
for
file_name
in
filenames
:
relative_path
=
os
.
path
.
relpath
(
os
.
path
.
join
(
dirpath
,
file_name
),
directory
)
result
.
append
(
relative_path
)
for
d
in
subdirs
:
path
=
os
.
path
.
join
(
dirpath
,
d
)
try
:
dirs
[
path
]
=
os
.
path
.
getmtime
(
path
)
except
FileNotFoundError
:
print
(
f
"Warning: Unable to access
{
path
}
. Skipping this path."
)
continue
return
result
,
dirs
def
filter_files_extensions
(
files
,
extensions
):
...
...
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