Allow original folder as input folder selector

This commit is contained in:
Reinhard Pointner 2016-03-11 04:11:40 +00:00
parent 10805ef9a4
commit 1251fbd657
1 changed files with 3 additions and 1 deletions

View File

@ -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<File, File> 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();