diff --git a/PVE/Storage/PBSPlugin.pm b/PVE/Storage/PBSPlugin.pm index fa966d9..1edaccc 100644 --- a/PVE/Storage/PBSPlugin.pm +++ b/PVE/Storage/PBSPlugin.pm @@ -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'}; }