]> git.puffer.fish Git - matthieu/pve-network.git/commitdiff
ipam: fix-up check for transition
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 18 Nov 2024 15:51:09 +0000 (16:51 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 18 Nov 2024 15:51:11 +0000 (16:51 +0100)
forgot to squash this into the original patch..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/Network/SDN/Ipams/PVEPlugin.pm

index efc1841b4e52a3b6e98b9a3c52a6029822fb5147..742f1b12e1f2d3960a2ea8940811a03376aa9ceb 100644 (file)
@@ -32,7 +32,7 @@ PVE::Cluster::cfs_register_file(
     sub {
        my ($filename, $data) = @_;
        # TODO: remove below with PVE 9+, add a pve8to9 check to allow doing so.
-       if (-e $ipamdb_file_legacy && $ipamdb_file) {
+       if (-e $ipamdb_file_legacy && -e $ipamdb_file) {
            # only clean-up if we succeeded to write the new path at least once
            unlink $ipamdb_file_legacy or $!{ENOENT} or warn "failed to unlink legacy IPAM DB - $!\n";
        }