mirror of https://github.com/apache/archiva.git
sort the files on the index
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@649401 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
eba490dfb5
commit
202feaa707
|
@ -22,7 +22,11 @@ package org.apache.maven.archiva.webdav.util;
|
||||||
import org.apache.jackrabbit.webdav.DavResource;
|
import org.apache.jackrabbit.webdav.DavResource;
|
||||||
import org.apache.jackrabbit.webdav.io.OutputContext;
|
import org.apache.jackrabbit.webdav.io.OutputContext;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
|
@ -91,7 +95,10 @@ public class IndexWriter
|
||||||
|
|
||||||
private void writeHyperlinks(PrintWriter writer)
|
private void writeHyperlinks(PrintWriter writer)
|
||||||
{
|
{
|
||||||
for (File file : localResource.listFiles())
|
List<File> files = new ArrayList<File>( Arrays.asList( localResource.listFiles() ) );
|
||||||
|
Collections.sort( files );
|
||||||
|
|
||||||
|
for ( File file : files )
|
||||||
{
|
{
|
||||||
writeHyperlink(writer, file.getName(), file.isDirectory());
|
writeHyperlink(writer, file.getName(), file.isDirectory());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue