* reverse-rename only if path has changed

This commit is contained in:
Reinhard Pointner 2013-08-07 02:58:45 +00:00
parent 7b9896b67e
commit 018d4303c4
1 changed files with 3 additions and 1 deletions

View File

@ -9,7 +9,9 @@ def revert(from, to) {
def action = net.sourceforge.filebot.StandardRenameAction.forName(_args.action)
println "[$action] Revert [$from] to [$to]"
action.rename(from, to)
if (!from.canonicalFile.equals(to.canonicalFile)) {
action.rename(from, to) // reverse-rename only if path has changed
}
// reset extended attributes
tryQuietly{ to.xattr.clear() }