mirror of
https://github.com/mitb-archive/filebot
synced 2024-08-13 17:03:45 -04:00
do nothing if current and original path is exactly the same
This commit is contained in:
parent
d277315f39
commit
d886f6569f
@ -134,6 +134,11 @@ public enum StandardRenameAction implements RenameAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static File revert(File current, File original) throws IOException {
|
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
|
// reverse move
|
||||||
if (current.exists() && !original.exists()) {
|
if (current.exists() && !original.exists()) {
|
||||||
return FileUtilities.moveRename(current, original);
|
return FileUtilities.moveRename(current, original);
|
||||||
|
Loading…
Reference in New Issue
Block a user