client: xdg usage: place() vs find()
place() is used when creating a file, as it will create intermediate directories, only use it when actually placing a new file. Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
@ -677,13 +677,13 @@ fn keyfile_parameters(param: &Value) -> Result<(Option<PathBuf>, CryptMode), Err
|
||||
|
||||
Ok(match (keyfile, crypt_mode) {
|
||||
// no parameters:
|
||||
(None, None) => (key::optional_default_key_path()?, CryptMode::Encrypt),
|
||||
(None, None) => (key::find_default_encryption_key()?, CryptMode::Encrypt),
|
||||
|
||||
// just --crypt-mode=none
|
||||
(None, Some(CryptMode::None)) => (None, CryptMode::None),
|
||||
|
||||
// just --crypt-mode other than none
|
||||
(None, Some(crypt_mode)) => match key::optional_default_key_path()? {
|
||||
(None, Some(crypt_mode)) => match key::find_default_encryption_key()? {
|
||||
None => bail!("--crypt-mode without --keyfile and no default key file available"),
|
||||
Some(path) => (Some(path), crypt_mode),
|
||||
}
|
||||
|
Reference in New Issue
Block a user