mirror of
https://github.com/mitb-archive/filebot
synced 2025-01-10 21:38:04 -05:00
no selection, do nothing and return successfully
This commit is contained in:
parent
d03794600b
commit
5b693caf22
@ -53,7 +53,7 @@ public class CmdlineOperationsTextUI extends CmdlineOperations {
|
||||
ui.setTheme(LanternaThemes.getRegisteredTheme(DEFAULT_THEME));
|
||||
}
|
||||
|
||||
public <T> T onScreen(Supplier<T> dialog) throws Exception {
|
||||
public synchronized <T> T onScreen(Supplier<T> dialog) throws Exception {
|
||||
try {
|
||||
screen.startScreen();
|
||||
return dialog.get();
|
||||
@ -72,6 +72,11 @@ public class CmdlineOperationsTextUI extends CmdlineOperations {
|
||||
// manually confirm each file mapping
|
||||
Map<File, File> selection = onScreen(() -> confirmRenameMap(renameMap, renameAction, conflictAction));
|
||||
|
||||
// no selection, do nothing and return successfully
|
||||
if (selection.isEmpty()) {
|
||||
return emptyList();
|
||||
}
|
||||
|
||||
return super.renameAll(selection, renameAction, conflictAction, matches);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user