From 89a48c26a13daaacf85ff0052eda291ceaccab82 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Tue, 4 Oct 2016 23:47:10 +0800 Subject: [PATCH] ignore empty arguments --- source/net/filebot/cli/ArgumentBean.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/net/filebot/cli/ArgumentBean.java b/source/net/filebot/cli/ArgumentBean.java index f09589a0..13588c78 100644 --- a/source/net/filebot/cli/ArgumentBean.java +++ b/source/net/filebot/cli/ArgumentBean.java @@ -148,10 +148,14 @@ public class ArgumentBean { // resolve given paths List files = new ArrayList(); - for (String argument : arguments) { - File file = new File(argument); + for (String it : arguments) { + // ignore empty arguments + if (it.trim().isEmpty()) + continue; // resolve relative paths + File file = new File(it); + try { file = file.getCanonicalFile(); } catch (Exception e) {