Skip to main content

check_export_path

Function check_export_path 

Source
pub fn check_export_path(path: &Path, force: bool) -> Result<(), Box<dyn Error>>
Expand description

Fail early when an explicit export path already exists and force is not set.

Call this before asking the server for the export, so the operator does not enter a password and wait for an export only for the write to be refused. write_secret_export still makes the authoritative check when it creates the file.