@@ -337,6 +337,20 @@ impl<'a> VaultWriter<'a> {
|
||||
editor_name: &str,
|
||||
signing: Option<&SigningPolicy>,
|
||||
committer: &mut impl EntryCommitter,
|
||||
) -> Result<WriteOutcome, WriteError> {
|
||||
self.finish_edit_recoverable(&session, replacement, editor_name, signing, committer)
|
||||
}
|
||||
|
||||
/// Finish an edit while retaining the session when validation, encryption,
|
||||
/// conflict detection, or commit orchestration fails.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn finish_edit_recoverable(
|
||||
&self,
|
||||
session: &EditSession,
|
||||
replacement: SecretBytes,
|
||||
editor_name: &str,
|
||||
signing: Option<&SigningPolicy>,
|
||||
committer: &mut impl EntryCommitter,
|
||||
) -> Result<WriteOutcome, WriteError> {
|
||||
if replacement.expose() == session.plaintext.expose() {
|
||||
return Err(WriteError::Unchanged);
|
||||
@@ -375,7 +389,7 @@ impl<'a> VaultWriter<'a> {
|
||||
return Err(WriteError::Commit(error));
|
||||
}
|
||||
Ok(WriteOutcome {
|
||||
path: session.path,
|
||||
path: session.path.clone(),
|
||||
action: EntryAction::Edit,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user