forked from StarOpenSource/Engine
Add forced early engine init stage check
This commit is contained in:
parent
ed1c8b9d3e
commit
2730aa0f61
1 changed files with 4 additions and 1 deletions
|
@ -176,11 +176,13 @@ public final class FileAccess {
|
|||
/**
|
||||
* Initializes all uninitialized static
|
||||
* {@link FileAccess} instances.
|
||||
* <p>
|
||||
* Only works during early engine startup.
|
||||
*
|
||||
* @since v1-alpha8
|
||||
*/
|
||||
public static void initializeInstances() throws IOException {
|
||||
if (cacheDirectory == null) {
|
||||
if (Engine.getInstance().getState() == EngineState.EARLY_STARTUP) {
|
||||
String temp = System.getProperty("os.name").toLowerCase(Locale.ROOT);
|
||||
|
||||
if (temp.contains("nix") || temp.contains("nux") || temp.contains("aix") || temp.contains("bsd"))
|
||||
|
@ -197,6 +199,7 @@ public final class FileAccess {
|
|||
}
|
||||
/**
|
||||
* Deletes all files scheduled for deletion.
|
||||
* <p>
|
||||
* Only works during engine shutdown.
|
||||
*
|
||||
* @since v1-alpha8
|
||||
|
|
Loading…
Reference in a new issue