mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-25 19:25:56 +00:00
fix(config): an imported server gets the module config files it lacks at start and after an update
A server without a module's active file (an old repack updated by the Manager) made two modules log a 'missing property' line on every world tick. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
375be1b2c5
commit
5c21ef106d
3 files changed
+41
-3
No files matched your search
@@ -486,10 +486,14 @@ impl Env for RepackEnv<'_> {
|
||||
use crate::process::{observe, ServiceState};
|
||||
// The check start is the first start of the new build: give the module configs the settings the update added
|
||||
// (as a normal start does), or the server logs a "missing property" line for every one of them.
|
||||
if let Ok((_, meta)) = crate::registry::MetaDir::open(self.meta_dir) {
|
||||
if meta.kind == crate::registry::InstallKind::New {
|
||||
match crate::registry::MetaDir::open(self.meta_dir) {
|
||||
Ok((_, meta)) if meta.kind == crate::registry::InstallKind::New => {
|
||||
let _ = crate::config::materialize_module_configs(self.root);
|
||||
}
|
||||
// An imported server gets the files it lacks (nothing it has is changed).
|
||||
_ => {
|
||||
let _ = crate::config::create_missing_module_configs(self.root);
|
||||
}
|
||||
}
|
||||
let started = crate::driver::run(self.root, crate::driver::Verb::StartAll)?;
|
||||
let ports = crate::layout::read_ports(self.root);
|
||||
|
||||
Reference in new issue
Block a user