PICARD-1346: Fix exception with move additional files

When multiple patterns for move additional files matched the same file an exception was thrown when attempting to move the files again after it already had been moved.
This commit is contained in:
Philipp Wolfer
2018-09-17 08:06:26 +02:00
parent b9bdbfe47b
commit bdbc541ddc

View File

@@ -442,6 +442,7 @@ class File(QtCore.QObject, Item):
file_names = filtered_names
for old_file in file_names:
if pattern_regex.match(old_file):
file_names.remove(old_file)
new_file = os.path.join(new_path, old_file)
old_file = os.path.join(old_path, old_file)
# FIXME we shouldn't do this from a thread!