From bdbc541ddc9be618dc37ce6718e58f450bf40f4f Mon Sep 17 00:00:00 2001 From: Philipp Wolfer Date: Mon, 17 Sep 2018 08:06:26 +0200 Subject: [PATCH] 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. --- picard/file.py | 1 + 1 file changed, 1 insertion(+) diff --git a/picard/file.py b/picard/file.py index 75ed5a842..b107de954 100644 --- a/picard/file.py +++ b/picard/file.py @@ -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!