From ab8b2496218f49f49d2602987481e2dd7a3e7293 Mon Sep 17 00:00:00 2001 From: ulrich <undisclosed@undiclosed> Date: Sat, 10 Apr 2021 17:59:27 +0000 Subject: [PATCH] UI-Anpassungen --- src/de/uhilger/mediaz/api/ListFileHandler.java | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/de/uhilger/mediaz/api/ListFileHandler.java b/src/de/uhilger/mediaz/api/ListFileHandler.java index 4c31548..e6452eb 100644 --- a/src/de/uhilger/mediaz/api/ListFileHandler.java +++ b/src/de/uhilger/mediaz/api/ListFileHandler.java @@ -30,6 +30,8 @@ import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.logging.Level; @@ -79,6 +81,7 @@ File dir = new File(fileBase, fName); logger.fine(dir.getAbsolutePath()); File[] files = dir.listFiles(); + Arrays.sort(files); ArrayList list = new ArrayList(); if(files != null) { for(File file : files) { @@ -103,6 +106,7 @@ list.add(sf); } } + //Collections.sort(list); String json = jsonWithCustomType(list, "Medialiste"); logger.fine(json); e.sendResponseHeaders(200, json.length()); -- Gitblit v1.9.3