Use max-length-name folder as download folder
This commit is contained in:
1 parent
933f51c96b
commit
2c50429ef9
1 file changed
+11
-2
@@ -81,12 +81,21 @@ public final class SpiderDen {
|
||||
if (null == dirname) {
|
||||
UniFile[] files = dir.listFiles(new StartWithFilenameFilter(galleryInfo.gid + "-"));
|
||||
if (null != files) {
|
||||
// Get max-length-name dir
|
||||
int maxLength = -1;
|
||||
for (UniFile file : files) {
|
||||
if (file.isDirectory()) {
|
||||
dirname = file.getName();
|
||||
EhDB.putDownloadDirname(galleryInfo.gid, dirname);
|
||||
String name = file.getName();
|
||||
int length = name.length();
|
||||
if (length > maxLength) {
|
||||
maxLength = length;
|
||||
dirname = name;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (null != dirname) {
|
||||
EhDB.putDownloadDirname(galleryInfo.gid, dirname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user