summaryrefslogtreecommitdiff
path: root/httemplate/misc/upload-batch.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/misc/upload-batch.cgi')
-rw-r--r--httemplate/misc/upload-batch.cgi5
1 files changed, 3 insertions, 2 deletions
diff --git a/httemplate/misc/upload-batch.cgi b/httemplate/misc/upload-batch.cgi
index cc53466..5d01501 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;
- my $paybatch = $1;
+ $filename =~ /^(.*[\/\\])?([^\/\\]+)$/
+ or die "unparsable filename: $filename\n";
+ my $paybatch = $2;
my $error = defined($fh)
? FS::cust_pay_batch::import_results( {