Skip to content

Commit 0693a81

Browse files
committed
Sort script files before adding them to the script index
This should provide some consistency in the order of the index. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent e47f077 commit 0693a81

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/org/scijava/script/ScriptFinder.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
package org.scijava.script;
3333

3434
import java.io.File;
35+
import java.util.Arrays;
3536
import java.util.HashSet;
3637
import java.util.List;
3738
import java.util.Set;
@@ -110,6 +111,7 @@ private int discoverScripts(final List<ScriptInfo> scripts,
110111
{
111112
final File[] fileList = directory.listFiles();
112113
if (fileList == null) return 0; // directory does not exist
114+
Arrays.sort(fileList);
113115

114116
int scriptCount = 0;
115117
final boolean isTopLevel = menuPath.size() == 0;

0 commit comments

Comments
 (0)