Make iso:// a destination for any image source, not just a drive
Writing an iso:// meant a raw sector copy off a drive, so an existing image could only ever be a source. Decrypting one you already had meant finding the disc again. The engine's copy is the recovery path — mapfile, multipass, damage-jump, auto-resume — and all of it exists because optical media returns read errors. A file does not, so a non-drive source gets write_image instead: sectors in, bytes out, once, no recovery machinery. Keeping them apart is not just tidiness. The mapfile identity check compares AACS unit keys and the VID, both empty for an already-decrypted source, so identity passes for any such source — a second run with different input to the same output path would resume over the previous image and report success. A short read is an error rather than a zero-fill: padding a truncated source yields an image that looks complete and is not, which is the worst outcome for a copy someone means to keep.
This commit is contained in:
@@ -191,6 +191,11 @@ pub use io::pipeline::{
|
||||
// continuously instead of bursting. General I/O infra, not recovery policy;
|
||||
// promoted to `pub` so freemkv-engine's relocated sweep/patch can use it too.
|
||||
pub use io::WritebackFile;
|
||||
/// Write an image-level source out as a sector image — what an `iso://`
|
||||
/// DESTINATION means for any source that is not a physical drive. Drive sources
|
||||
/// go through `freemkv_engine::copy`, which is the recovery path; see
|
||||
/// [`io::image_writer`] for why the two are deliberately separate.
|
||||
pub use io::image_writer::write_image;
|
||||
|
||||
// ─── Drive events (low-level callbacks) ─────────────────────────────────────
|
||||
pub use event::{BatchSizeReason, Event, EventKind};
|
||||
|
||||
Reference in New Issue
Block a user