mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-12-01 14:22:34 -08:00
Config check if config path exists and create it if not (#1176)
This commit is contained in:
1 parent
27244ff974
commit
136434e5c7
1 file changed
+6
@@ -115,6 +115,12 @@ public class ConfigManager {
|
||||
|
||||
// Serialize config
|
||||
try {
|
||||
var file = cfgFile.toFile();
|
||||
if (!file.getAbsoluteFile().getParentFile().exists() && !file.mkdirs()) {
|
||||
LogManager
|
||||
.severe("Unable to create folders for config on path \"" + cfgFile + "\"");
|
||||
return;
|
||||
}
|
||||
om.writeValue(tmpCfgFile.toFile(), this.vrConfig);
|
||||
} catch (IOException e) {
|
||||
LogManager.severe("Unable to write serialized config to \"" + tmpCfgFile + "\"", e);
|
||||
|
||||
Reference in new issue
Block a user