Ref: directoryManager.getLocalCacheFiles() already provides a list of .wool,...
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user