From d886f6569f3f5e43e646526f58176633e05f4257 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Mon, 16 May 2016 01:49:54 +0800 Subject: [PATCH] do nothing if current and original path is exactly the same --- source/net/filebot/StandardRenameAction.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/net/filebot/StandardRenameAction.java b/source/net/filebot/StandardRenameAction.java index f9f051cf..66d31fb7 100644 --- a/source/net/filebot/StandardRenameAction.java +++ b/source/net/filebot/StandardRenameAction.java @@ -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);