Fix Dataset.remove_files() does not match when files are in the root of the dataset (#303)

Co-authored-by: Gabriel Lema <glema@ulta.com>
This commit is contained in:
glemarivero 2021-02-07 12:12:01 -03:00 committed by GitHub
parent 28b85028fe
commit fbbae0b8bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -214,7 +214,7 @@ class Dataset(object):
self._dataset_file_entries = { self._dataset_file_entries = {
k: v for k, v in self._dataset_file_entries.items() k: v for k, v in self._dataset_file_entries.items()
if not (fnmatch(k, path) and fnmatch(k, '*/' + wildcard))} if not (fnmatch(k, path) and fnmatch(k if '/' in k else '/{}'.format(k), '*/' + wildcard))}
if verbose and org_files: if verbose and org_files:
for f in org_files: for f in org_files: