From 8950be198d09bf5e9e0959fe2b55726be63a2397 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 8 Oct 2003 04:09:05 +0000 Subject: [PATCH] can't use File::Basename::basename for windows filenames! use a regex instead --- htetc/global.asa | 1 - htetc/handler.pl | 1 - httemplate/misc/upload-batch.cgi | 3 ++- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/htetc/global.asa b/htetc/global.asa index ee5cfcb3c..2e31be394 100644 --- a/htetc/global.asa +++ b/htetc/global.asa @@ -9,7 +9,6 @@ use CGI 2.47; use Date::Format; use Date::Parse; use Time::Local; -use File::Basename; use Tie::IxHash; use HTML::Entities; use IO::Handle; diff --git a/htetc/handler.pl b/htetc/handler.pl index b007353e3..ba73bcfaf 100644 --- a/htetc/handler.pl +++ b/htetc/handler.pl @@ -67,7 +67,6 @@ sub handler use Date::Format; use Date::Parse; use Time::Local; - use File::Basename; use Tie::IxHash; use HTML::Entities; use IO::Handle; diff --git a/httemplate/misc/upload-batch.cgi b/httemplate/misc/upload-batch.cgi index 565a6da5c..cc5346606 100644 --- a/httemplate/misc/upload-batch.cgi +++ b/httemplate/misc/upload-batch.cgi @@ -2,7 +2,8 @@ my $fh = $cgi->upload('batch_results'); my $filename = $cgi->param('batch_results'); - my $paybatch = basename($filename); + $filename =~ /^.*[\/\\]([^\/\\]+)$/ or die; + my $paybatch = $1; my $error = defined($fh) ? FS::cust_pay_batch::import_results( { -- 2.11.0