diff --git a/source/net/filebot/cli/CmdlineOperations.java b/source/net/filebot/cli/CmdlineOperations.java index c5f064e7..f644a84f 100644 --- a/source/net/filebot/cli/CmdlineOperations.java +++ b/source/net/filebot/cli/CmdlineOperations.java @@ -39,6 +39,7 @@ import java.util.TreeSet; import java.util.logging.Level; import java.util.regex.Pattern; import java.util.stream.IntStream; +import java.util.stream.Stream; import net.filebot.HistorySpooler; import net.filebot.Language; @@ -1095,8 +1096,9 @@ public class CmdlineOperations implements CmdlineInterface { Map history = HistorySpooler.getInstance().getCompleteHistory().getRenameMap(); return history.entrySet().stream().filter(it -> { + File original = it.getKey(); File current = it.getValue(); - return listPath(current).stream().anyMatch(whitelist::contains) && current.exists() && fileFilter.accept(current); + return Stream.of(current, original).flatMap(f -> listPath(f).stream()).anyMatch(whitelist::contains) && current.exists() && fileFilter.accept(current); }).map(it -> { File original = it.getKey(); File current = it.getValue();