mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-06-18 23:01:07 +00:00
Fix resource loader threading issues
This commit is contained in:
@@ -287,6 +287,8 @@ public class ResourceLoader<T extends IrisRegistrant> implements MeteredCache {
|
||||
|
||||
public KList<File> getFolders() {
|
||||
if(folderCache.get() == null) {
|
||||
synchronized(folderCache)
|
||||
{
|
||||
folderCache.set(new KList<>());
|
||||
|
||||
for(File i : root.listFiles()) {
|
||||
@@ -298,6 +300,7 @@ public class ResourceLoader<T extends IrisRegistrant> implements MeteredCache {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return folderCache.get();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user