Add JVM argument for data directory (#10350)
All checks were successful
Validate Gradle Wrapper / Validation (push) Successful in 32s
Tests / runPush (push) Successful in 32m11s

This commit is contained in:
ahdg 2024-11-26 03:33:13 +08:00 committed by GitHub
parent ce3a6e5299
commit d65f226b3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -35,7 +35,7 @@ public abstract class ClientLauncher extends ApplicationCore implements Platform
@Override
public void setup(){
String dataDir = OS.env("MINDUSTRY_DATA_DIR");
String dataDir = System.getProperty("mindustry.data.dir", OS.env("MINDUSTRY_DATA_DIR"));
if(dataDir != null){
Core.settings.setDataDirectory(files.absolute(dataDir));
}