fix: [items source] fix empty sources list

pull/604/head
Terrtia 2023-08-29 11:59:39 +02:00
parent 546d6538fd
commit 24969610cc
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
1 changed files with 4 additions and 1 deletions

View File

@ -209,7 +209,10 @@ def _get_dir_source_name(directory, source_name=None, l_sources_name=set(), filt
l_dir = os.listdir(directory)
# empty directory
if not l_dir:
return l_sources_name.add(source_name)
if source_name:
return l_sources_name.add(source_name)
else:
return l_sources_name
else:
for src_name in l_dir:
if len(src_name) == 4: