surround filenames containing whitespace with quotes

This commit is contained in:
Nicolas Phister 2021-11-03 14:43:37 +01:00
parent cb40e9682e
commit 8ddeaab59d

View file

@ -109,6 +109,12 @@ class Classifier:
hook.types_or, hook.types_or,
hook.exclude_types, hook.exclude_types,
) )
# surround filenames containing whitespace with quotes
for f in names:
if re.search(r"\s", f):
f = '"' + f + '"'
return tuple(names) return tuple(names)
@classmethod @classmethod