pbs: check if encryption key could be deleted
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
@ -113,7 +113,10 @@ sub pbs_delete_encryption_key {
|
||||
|
||||
my $pwfile = pbs_encryption_key_file_name($scfg, $storeid);
|
||||
|
||||
unlink $pwfile;
|
||||
if (!unlink $pwfile) {
|
||||
return if $! == ENOENT;
|
||||
die "failed to delete encryption key! $!\n";
|
||||
}
|
||||
delete $scfg->{'encryption-key'};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user