support restore preset password except clear password

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages
2025-12-16 11:18:24 +08:00
parent 8b0e258673
commit af5227a537

View File

@@ -1070,7 +1070,9 @@ impl Config {
.get("password")
.map_or(false, |v| v == password)
{
return;
if CONFIG.read().unwrap().password.is_empty() {
return;
}
}
let mut config = CONFIG.write().unwrap();
if password == config.password {