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