diff --git a/source/net/filebot/cli/CmdlineOperations.java b/source/net/filebot/cli/CmdlineOperations.java index 87303a34..037c9a8b 100644 --- a/source/net/filebot/cli/CmdlineOperations.java +++ b/source/net/filebot/cli/CmdlineOperations.java @@ -679,12 +679,10 @@ public class CmdlineOperations implements CmdlineInterface { } private static File nextAvailableIndexedName(File file) { - IntStream seq = IntStream.range(1, 100); - File parent = file.getParentFile(); String name = getName(file); String ext = getExtension(file); - return seq.mapToObj(i -> new File(parent, name + '.' + i + '.' + ext)).filter(f -> !f.exists()).findFirst().get(); + return IntStream.range(1, 100).mapToObj(i -> new File(parent, name + '.' + i + '.' + ext)).filter(f -> !f.exists()).findFirst().get(); } @Override