pbs client: delete password: return success for non-existent file

It's currently possible to add a remote in PMG without password (via
API), but deletion of such a remote would fail here.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fabian Ebner 2022-07-20 12:59:41 +02:00 committed by Wolfgang Bumiller
parent 07c10d58a6
commit 01d2fb7844

View File

@ -77,7 +77,7 @@ sub delete_password {
my $pwfile = password_file_name($self);
unlink $pwfile or die "deleting password file failed - $!\n";
unlink $pwfile or $! == ENOENT or die "deleting password file failed - $!\n";
};
sub get_password {