]> git.proxmox.com Git - qemu-server.git/commitdiff
api/create: print correct error message if cleanup fails
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 26 Jan 2019 13:39:38 +0000 (14:39 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 26 Jan 2019 13:39:38 +0000 (14:39 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/API2/Qemu.pm

index b55fd13cbfb95e317d0a848e0f536e883aa30d5f..148ea1ace506865b3e9072b0442c8f5ebf24cda2 100644 (file)
@@ -648,8 +648,7 @@ __PACKAGE__->register_method({
                if (my $err = $@) {
                    eval {
                        my $conffile = PVE::QemuConfig->config_file($vmid);
-                       unlink($conffile)
-                           or die "failed to remove config file: $@\n";
+                       unlink($conffile) or die "failed to remove config file: $!\n";
                    };
                    warn $@ if $@;
                    die $err;