]> git.proxmox.com Git - pmg-api.git/commitdiff
subscription: followup: use correct errno variable if unlink fails
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 3 Jun 2020 17:36:20 +0000 (19:36 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 3 Jun 2020 17:36:55 +0000 (19:36 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PMG/API2/Subscription.pm

index c1323c587553656ea7199645681035a1d045c237..a231cbd3cebb360268d59f014153f0a7585b4b0c 100644 (file)
@@ -205,7 +205,7 @@ __PACKAGE__->register_method ({
     code => sub {
        my $subscription_file = '/etc/pmg/subscription';
        return if ! -e $subscription_file;
-       unlink($subscription_file) or die "cannot delete subscription key: $1";
+       unlink($subscription_file) or die "cannot delete subscription key: $!";
        return undef;
     }});