1
0
mirror of https://github.com/mitb-archive/filebot synced 2025-01-11 05:48:01 -05:00

* 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

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() }