* make things less filesystem dependent (less exception prone, still works)
This commit is contained in:
parent
7405166cd0
commit
1dbe3b81c7
|
@ -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 {
|
|
||||||
File file = new File(argument).getCanonicalFile();
|
|
||||||
|
|
||||||
// resolve folders
|
// resolve folders
|
||||||
|
File file = new File(argument).getAbsoluteFile();
|
||||||
files.addAll(resolveFolders && file.isDirectory() ? listFiles(singleton(file), 0, false) : singleton(file));
|
files.addAll(resolveFolders && file.isDirectory() ? listFiles(singleton(file), 0, false) : singleton(file));
|
||||||
} catch (IOException e) {
|
|
||||||
throw new IllegalArgumentException(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return files;
|
return files;
|
||||||
|
|
Loading…
Reference in New Issue