From f1e277cd884f95f5695ae944fb34e4c8d82ea655 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Sat, 26 Jan 2019 14:39:38 +0100 Subject: [PATCH] api/create: print correct error message if cleanup fails Signed-off-by: Thomas Lamprecht --- PVE/API2/Qemu.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index b55fd13..148ea1a 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -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; -- 2.39.2