2. excluded_files
3. filter_func (which must return whether the file is accepted or not)
'''
+
if len(source_path) > 0:
+ # ensure that exactly one '/' at end of dir is also removed
+ source_path = source_path.rstrip(os.sep) + os.sep
path = path[len(source_path):]
# 1. filter included_files
op_type = ipath['type']
# filter paths
- if self.filter_path(upath, '.', op_type == 'directory') == NO_MATCH:
+ if self.filter_path(upath, '', op_type == 'directory') == NO_MATCH:
continue
# if types of the file mismatch, the file needs to be deleted