Bug Fix
Fixed an error in the file format array that caused a crash.
This commit is contained in:
parent
0bfb18af09
commit
56d884fe39
@ -35,12 +35,11 @@ public class Picture_Lister {
|
||||
System.exit(0);
|
||||
}
|
||||
String picture_dir = args[0];
|
||||
String[] file_format = {".png"};
|
||||
String[] file_format = new String[10];
|
||||
if (args.length > 1){
|
||||
for(int i = 1; i < args.length; i++){
|
||||
file_format[i-1] = args[i];
|
||||
}
|
||||
|
||||
}
|
||||
System.out.println(picture_dir);
|
||||
//Creating a File object for directory
|
||||
@ -50,7 +49,7 @@ public class Picture_Lister {
|
||||
@Override
|
||||
public boolean accept(File dir, String name) {
|
||||
if(name.lastIndexOf('.')>0) {
|
||||
String[] include = file_format;
|
||||
String[] include = file_format;
|
||||
// get last index for '.' char
|
||||
int lastIndex = name.lastIndexOf('.');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user