From 6dae1be9e256deb796e99fd2f235bcbd61ccb460 Mon Sep 17 00:00:00 2001 From: Miquel Lionel Date: Thu, 24 Jun 2021 11:55:16 +0100 Subject: Simplify link auto-deletion --- link-tmpl-template.cgi | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'link-tmpl-template.cgi') diff --git a/link-tmpl-template.cgi b/link-tmpl-template.cgi index 2984e9f..aadafc4 100644 --- a/link-tmpl-template.cgi +++ b/link-tmpl-template.cgi @@ -1,5 +1,6 @@ #! /usr/bin/perl -wT my $linkuser = q{link_user}; +my $linkfilename = q{link_filename}; use warnings; use strict; use GPG; @@ -73,9 +74,7 @@ else { } } - if ($0 =~ /([\w]+)\.cgi$/){ - unlink "$1.cgi"; - } + unlink $linkfilename; print "Location: /merci/index.html\n\n"; } } -- cgit v1.2.3-70-g09d2