Create datadir before install to store installer.log
Launcher is not skipped anymore if no datadir exists the code in main.rs line 138 to create the datadir needs to be duplicated in this case.
This commit is contained in:
parent
dee083c6d1
commit
977d8fa2dd
@ -199,6 +199,18 @@ impl Application for GUI {
|
||||
}
|
||||
(State::Launcher(l), Message::Launch(msg)) => match *msg {
|
||||
launcher::Message::Install(datadir_path, network) => {
|
||||
if !datadir_path.exists() {
|
||||
// datadir is created right before launching the installer
|
||||
// so logs can go in <datadir_path>/installer.log
|
||||
if let Err(e) = create_datadir(&datadir_path) {
|
||||
error!("Failed to create datadir: {}", e);
|
||||
} else {
|
||||
info!(
|
||||
"Created a fresh data directory at {}",
|
||||
&datadir_path.to_string_lossy()
|
||||
);
|
||||
}
|
||||
}
|
||||
self.logger.set_installer_mode(
|
||||
datadir_path.clone(),
|
||||
self.log_level.unwrap_or(LevelFilter::INFO),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user