1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-24 16:58:51 -05:00
This commit is contained in:
Reinhard Pointner 2016-02-09 17:16:14 +00:00
parent aba1effc83
commit 856972e4da

View File

@ -679,12 +679,10 @@ public class CmdlineOperations implements CmdlineInterface {
} }
private static File nextAvailableIndexedName(File file) { private static File nextAvailableIndexedName(File file) {
IntStream seq = IntStream.range(1, 100);
File parent = file.getParentFile(); File parent = file.getParentFile();
String name = getName(file); String name = getName(file);
String ext = getExtension(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 @Override