Skip to content

Commit

Permalink
Write out the update info sector when the volume is closed.
Browse files Browse the repository at this point in the history
  • Loading branch information
thejpster committed Oct 30, 2024
1 parent fa664f4 commit 169bb26
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/volume_mgr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,13 @@ where
}

let volume_idx = self.get_volume_by_id(volume)?;

match &mut self.open_volumes[volume_idx].volume_type {
VolumeType::Fat(fat_volume) => {
fat_volume.update_info_sector(&self.block_device)?;
}
}

self.open_volumes.swap_remove(volume_idx);

Ok(())
Expand Down

0 comments on commit 169bb26

Please sign in to comment.