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