1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-02 08:25:02 -04:00

do nothing if current and original path is exactly the same

This commit is contained in:
Reinhard Pointner 2016-05-16 01:49:54 +08:00
parent d277315f39
commit d886f6569f

View File

@ -134,6 +134,11 @@ public enum StandardRenameAction implements RenameAction {
}
public static File revert(File current, File original) throws IOException {
// do nothing if current and original path is exactly the same
if (current.equals(original)) {
return original;
}
// reverse move
if (current.exists() && !original.exists()) {
return FileUtilities.moveRename(current, original);