From 01d2fb7844c7f6177e341148d83f110df44564b2 Mon Sep 17 00:00:00 2001 From: Fabian Ebner Date: Wed, 20 Jul 2022 12:59:41 +0200 Subject: [PATCH] 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 --- src/PVE/PBSClient.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/PBSClient.pm b/src/PVE/PBSClient.pm index 37385d7..f19199c 100644 --- a/src/PVE/PBSClient.pm +++ b/src/PVE/PBSClient.pm @@ -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 {