mix folders and files on sort by date for local folders too

This commit is contained in:
Andy Scherzinger 2016-09-04 19:32:14 +02:00
parent 304ab15b51
commit 92d28b8e83

View file

@ -302,15 +302,7 @@ public class FileStorageUtils {
Collections.sort(files, new Comparator<File>() {
public int compare(File o1, File o2) {
if (o1.isDirectory() && o2.isDirectory()) {
Long obj1 = o1.lastModified();
return multiplier * obj1.compareTo(o2.lastModified());
}
else if (o1.isDirectory()) {
return -1;
} else if (o2.isDirectory()) {
return 1;
} else if (o1.lastModified() == 0 || o2.lastModified() == 0){
if (o1.lastModified() == 0 || o2.lastModified() == 0){
return 0;
} else {
Long obj1 = o1.lastModified();