mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-25 18:19:14 +00:00
Fix data loader issues
This commit is contained in:
@@ -286,19 +286,23 @@ public class ResourceLoader<T extends IrisRegistrant> implements MeteredCache {
|
||||
}
|
||||
|
||||
public KList<File> getFolders() {
|
||||
if(folderCache.get() == null) {
|
||||
synchronized(folderCache)
|
||||
{
|
||||
folderCache.set(new KList<>());
|
||||
|
||||
|
||||
synchronized(folderCache)
|
||||
{
|
||||
if(folderCache.get() == null) {
|
||||
KList<File> fc = new KList<>();
|
||||
|
||||
for(File i : root.listFiles()) {
|
||||
if(i.isDirectory()) {
|
||||
if(i.getName().equals(folderName)) {
|
||||
folderCache.get().add(i);
|
||||
fc.add(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
folderCache.set(fc);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user