mirror of
https://github.com/Cyrix126/gupaxx.git
synced 2024-11-16 15:27:46 +00:00
fix: possible crash if config was using old deleted path and p2pool was auto started.
This commit is contained in:
parent
c203f45d34
commit
d7e41c6d06
1 changed files with 6 additions and 0 deletions
|
@ -144,6 +144,12 @@ pub fn init_auto(app: &mut App) {
|
|||
} else {
|
||||
info!("Starting init_auto()...");
|
||||
}
|
||||
// update the absolute path, or gupaxx will crash if it's not valid and p2pool is enabled since it only verify the relative path.
|
||||
// it could be the case if gupaxx was manually installed, the relative path stay the same but absolute path will also still stay on the old path that maybe is deleted. SO the check with the absolute path would be valid but when launched with the other old/wrong path from absolute, it would panic.
|
||||
// this change is non breaking and will fix the issue if it was occurring.
|
||||
app.state
|
||||
.update_absolute_path()
|
||||
.expect("could not get the current path");
|
||||
|
||||
// [Auto-Update]
|
||||
#[cfg(not(feature = "distro"))]
|
||||
|
|
Loading…
Reference in a new issue