Ref: directoryManager.getLocalCacheFiles() already provides a list of .wool,...

This commit is contained in:
Sheepit Renderfarm
2025-01-11 11:14:29 +00:00
parent c8d99620b6
commit a1cbdf87a9
2 changed files with 7 additions and 14 deletions

View File

@@ -705,19 +705,12 @@ public class ServerRequest extends Thread {
private String generateXMLForMD5cache() {
List<FileMD5> md5s = new ArrayList<>();
for (File local_file : this.directoryManager.getLocalCacheFiles()) {
try {
String extension = local_file.getName().substring(local_file.getName().lastIndexOf('.')).toLowerCase();
String name = local_file.getName().substring(0, local_file.getName().length() - 1 * extension.length());
if (".wool".equals(extension)) {
// node_file.setAttribute("md5", name);
FileMD5 fileMD5 = new FileMD5();
fileMD5.setMd5(name);
md5s.add(fileMD5);
}
}
catch (StringIndexOutOfBoundsException e) { // because the file does not have an . its path
}
String extension = local_file.getName().substring(local_file.getName().lastIndexOf('.')).toLowerCase();
String name = local_file.getName().substring(0, local_file.getName().length() - extension.length());
FileMD5 fileMD5 = new FileMD5();
fileMD5.setMd5(name);
md5s.add(fileMD5);
}
CacheFileMD5 cache = new CacheFileMD5();