From: Thomas Lamprecht Date: Fri, 8 May 2020 07:38:34 +0000 (+0200) Subject: ldap_delete_credentials: don't complain if already deleted X-Git-Url: https://git.proxmox.com/?p=pve-access-control.git;a=commitdiff_plain;h=eeabad5a1363782e7916429db718d3b472e47779 ldap_delete_credentials: don't complain if already deleted Signed-off-by: Thomas Lamprecht --- diff --git a/PVE/Auth/LDAP.pm b/PVE/Auth/LDAP.pm index 64250cb..9fa9095 100755 --- a/PVE/Auth/LDAP.pm +++ b/PVE/Auth/LDAP.pm @@ -411,6 +411,7 @@ sub ldap_delete_credentials { my ($realmid) = @_; if (my $cred_file = get_cred_file($realmid)) { + return if ! -e $cred_file; # nothing to do unlink($cred_file) or warn "removing LDAP credentials '$cred_file' failed: $!\n"; } }