Refactor CmdlineOperations console output (i.e. don't say "rename" when using other actions like copy or hardlink)

This commit is contained in:
Reinhard Pointner 2017-02-17 22:09:51 +08:00
parent 4897adf913
commit 5cc6ec0bb0
1 changed files with 2 additions and 2 deletions

View File

@ -615,7 +615,7 @@ public class CmdlineOperations implements CmdlineInterface {
// rename file, throw exception on failure
if (!destination.equals(source) && !destination.exists()) {
log.info(format("[%s] Rename [%s] to [%s]", renameAction, source, destination));
log.info(format("[%s] From [%s] to [%s]", renameAction, source, destination));
destination = renameAction.rename(source, destination);
// remember successfully renamed matches for history entry and possible revert
@ -624,7 +624,7 @@ public class CmdlineOperations implements CmdlineInterface {
log.info(format("Skipped [%s] because [%s] already exists", source, destination));
}
} catch (IOException e) {
log.warning(format("[%s] Failed to rename [%s] due to [%s]", renameAction, it.getKey(), e));
log.warning(format("[%s] Failure: %s", renameAction, e));
throw e;
}
}