Skip to main content

save_existing_sop_typed

Function save_existing_sop_typed 

pub fn save_existing_sop_typed(
    sops_dir: &Path,
    sop: &Sop,
) -> Result<(), SopAuthorError>
Expand description

Save edits to a SOP that already exists, under the authoring lock.

An edit-save names the SOP it was loaded from. If that SOP has since been renamed or deleted, writing it would silently resurrect a retired identity alongside the renamed one. Creating a SOP is its own explicit operation (create_sop_typed), so an edit-save whose target no longer exists is refused as NotFound. The target is also resolved without following symlinks and confirmed to sit inside the SOP root before anything is written, so a planted link cannot redirect the save outside it.