ksud: make it buildable without git installed

This commit is contained in:
tiann
2023-02-24 11:41:32 +08:00
parent 40d7d62af2
commit 8ed3bd53ac
2 changed files with 25 additions and 15 deletions

View File

@@ -223,6 +223,7 @@ pub fn on_boot_completed() -> Result<()> {
let module_img = Path::new(defs::MODULE_IMG);
if module_update_img.exists() {
// this is a update and we successfully booted
std::fs::rename(module_update_img, module_img)?;
if std::fs::rename(module_update_img, module_img).is_err() {
warn!("Failed to rename images, copy it now.",);
std::fs::copy(module_update_img, module_img)