in fuzzing/tools/make_corpus_dir.py [0:0]
def expand_corpus_to_file_list(corpus, file_list):
if not os.path.exists(corpus):
raise FileNotFoundError("file " + corpus + " doesn't exist")
if os.path.isdir(corpus):
# The first element in glob("dir/**") is "dir/", which needs to be excluded
file_list.extend(glob.glob(os.path.join(corpus, "**"), recursive=True)[1:])
else:
file_list.append(corpus)