This commit is contained in:
Reinhard Pointner 2016-02-09 17:16:14 +00:00
parent aba1effc83
commit 856972e4da
1 changed files with 1 additions and 3 deletions

View File

@ -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