* fix --conflict skip behaviour for fn:replace

This commit is contained in:
Reinhard Pointner 2013-01-09 09:08:53 +00:00
parent 8466c7cb1b
commit e8513bfd54
3 changed files with 7 additions and 3 deletions

View File

@ -90,7 +90,6 @@ ded
Demonoid Demonoid
Director's.Cut Director's.Cut
Directors.Cut Directors.Cut
Discovery.Channel
DL DL
DLLValley DLLValley
DLLValley.eu DLLValley.eu

View File

@ -614,6 +614,7 @@ Gogeta
GokU61 GokU61
GoLDSToNE GoLDSToNE
GOOGLE GOOGLE
Gopo
GORE GORE
GOREHOUNDS GOREHOUNDS
GOTHiC GOTHiC

View File

@ -14,11 +14,15 @@ args.getFiles{ accept(it) }.each{
// override files only when --conflict override is set // override files only when --conflict override is set
if (!it.equals(nfile)) { if (!it.equals(nfile)) {
if ((nfile.exists() || _args.conflict == 'override') && action != StandardRenameAction.TEST) { if (nfile.exists() && _args.conflict == 'override' && action != StandardRenameAction.TEST) {
nfile.delete(); // resolve conflict nfile.delete(); // resolve conflict
} }
println action.rename(it, nfile) if (!nfile.exists()) {
println action.rename(it, nfile)
} else {
println "Skipped $nfile"
}
} }
} }
} }