* make things less filesystem dependent (less exception prone, still works)

This commit is contained in:
Reinhard Pointner 2012-02-09 09:39:13 +00:00
parent 7405166cd0
commit 1dbe3b81c7
1 changed files with 3 additions and 9 deletions

View File

@ -7,7 +7,6 @@ import static net.sourceforge.tuned.FileUtilities.*;
import java.io.File; import java.io.File;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.net.URL; import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
@ -120,14 +119,9 @@ public class ArgumentBean {
// resolve given paths // resolve given paths
for (String argument : arguments) { for (String argument : arguments) {
try { // resolve folders
File file = new File(argument).getCanonicalFile(); File file = new File(argument).getAbsoluteFile();
files.addAll(resolveFolders && file.isDirectory() ? listFiles(singleton(file), 0, false) : singleton(file));
// resolve folders
files.addAll(resolveFolders && file.isDirectory() ? listFiles(singleton(file), 0, false) : singleton(file));
} catch (IOException e) {
throw new IllegalArgumentException(e);
}
} }
return files; return files;