From 038eaf525927a161e40577b2f2eec96c30523a6d Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 28 May 2004 11:33:21 +0000 Subject: [PATCH] not entirely sure why we're checking the filename at all... to catch empty form submissions? --- httemplate/misc/upload-batch.cgi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/httemplate/misc/upload-batch.cgi b/httemplate/misc/upload-batch.cgi index da5e41cbc..5d0150177 100644 --- a/httemplate/misc/upload-batch.cgi +++ b/httemplate/misc/upload-batch.cgi @@ -2,8 +2,9 @@ my $fh = $cgi->upload('batch_results'); my $filename = $cgi->param('batch_results'); - $filename =~ /^.*[\/\\]([^\/\\]+)$/ or die "unparsable filename: $filename\n"; - my $paybatch = $1; + $filename =~ /^(.*[\/\\])?([^\/\\]+)$/ + or die "unparsable filename: $filename\n"; + my $paybatch = $2; my $error = defined($fh) ? FS::cust_pay_batch::import_results( { -- 2.11.0