Skip to content

Commit

Permalink
ksud: fix potential slow copy
Browse files Browse the repository at this point in the history
  • Loading branch information
tiann committed Jan 30, 2024
1 parent 7cb5fb4 commit 27bd18f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion userspace/ksud/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ pub fn on_boot_completed() -> Result<()> {
// this is a update and we successfully booted
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)
utils::copy_sparse_file(module_update_img, module_img)
.with_context(|| "Failed to copy images")?;
std::fs::remove_file(module_update_img).with_context(|| "Failed to remove image!")?;
}
Expand Down

0 comments on commit 27bd18f

Please sign in to comment.