* fix crash if amc clean=y is called a single video file

This commit is contained in:
Reinhard Pointner 2013-11-10 06:15:28 +00:00
parent 0edfa6cced
commit 1d76930e02
1 changed files with 6 additions and 2 deletions

View File

@ -354,7 +354,11 @@ if (clean) {
// deleting remaining files only makes sense after moving files
if ('MOVE'.equalsIgnoreCase(_args.action)) {
_log.info 'Clean clutter files and empty folders'
executeScript('cleaner', args.empty ? [root:true] : [root:false], !args.empty ? args : ut_kind == 'multi' && ut_dir ? [ut_dir as File] : [])
def cleanerInput = !args.empty ? args : ut_kind == 'multi' && ut_dir ? [ut_dir as File] : []
cleanerInput = cleanerInput.findAll{ f -> f.exists() }
if (cleanerInput.size() > 0) {
_log.info 'Clean clutter files and empty folders'
executeScript('cleaner', args.empty ? [root:true] : [root:false], cleanerInput)
}
}
}