From 9865bd176bde875b1f1eaf4d4319c5c3b298ff69 Mon Sep 17 00:00:00 2001 From: ulrich Date: Sat, 10 Apr 2021 18:14:44 +0000 Subject: [PATCH] Fehler bei Abspielliste-Formular bei Cancel behoben --- 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