mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-11 02:15:17 +00:00
forgot windows does double backslashes for paths due to its use as escape char.
This commit is contained in:
parent
81082045c2
commit
e58887dfa7
4
nodes.py
4
nodes.py
@ -30,8 +30,8 @@ def recursive_search(directory):
|
|||||||
result = []
|
result = []
|
||||||
for root, subdir, file in os.walk(directory, followlinks=True):
|
for root, subdir, file in os.walk(directory, followlinks=True):
|
||||||
for filepath in file:
|
for filepath in file:
|
||||||
#we remove the first character to remove the path separator.
|
#we os.path,join directory with a blank string to generate a path separator at the end.
|
||||||
result.append(os.path.join(root, filepath).replace(directory,'')[1:])
|
result.append(os.path.join(root, filepath).replace(os.path.join(directory,''),''))
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def filter_files_extensions(files, extensions):
|
def filter_files_extensions(files, extensions):
|
||||||
|
Loading…
Reference in New Issue
Block a user