fix handling of files with non-matching names...
This commit is contained in:
parent
863d7e77f8
commit
0e61eee899
@ -19,7 +19,9 @@ def get_files_in_dir(path, regex, timeformat, recurse=False):
|
|||||||
for root,dirs,files in os.walk(path, topdown=False):
|
for root,dirs,files in os.walk(path, topdown=False):
|
||||||
for f in files:
|
for f in files:
|
||||||
prefix, timestamp = parse_filename(f, regex, timeformat)
|
prefix, timestamp = parse_filename(f, regex, timeformat)
|
||||||
if prefix and prefix not in res:
|
if not prefix:
|
||||||
|
continue
|
||||||
|
if prefix not in res:
|
||||||
res[prefix] = set()
|
res[prefix] = set()
|
||||||
res[prefix].add((os.path.join(root,f), timestamp))
|
res[prefix].add((os.path.join(root,f), timestamp))
|
||||||
if not recurse:
|
if not recurse:
|
||||||
|
Loading…
Reference in New Issue
Block a user