Refactor CmdlineOperations console output (i.e. don't say "rename" when using other actions like copy or hardlink)
This commit is contained in:
parent
4897adf913
commit
5cc6ec0bb0
|
@ -615,7 +615,7 @@ public class CmdlineOperations implements CmdlineInterface {
|
||||||
|
|
||||||
// rename file, throw exception on failure
|
// rename file, throw exception on failure
|
||||||
if (!destination.equals(source) && !destination.exists()) {
|
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);
|
destination = renameAction.rename(source, destination);
|
||||||
|
|
||||||
// remember successfully renamed matches for history entry and possible revert
|
// 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));
|
log.info(format("Skipped [%s] because [%s] already exists", source, destination));
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} 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;
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue