From 0eaad61ada3a45d2979b681dc41049da8bbf9beb Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Tue, 14 Sep 2021 15:02:38 -0400 Subject: [PATCH] Lp 1943634: Fix MARC Stream Importer Temp File Creation Use fileparse on $0 in marc_stream_importer.pl to get the program's basename and use that instead of $0 to generate the temp file's name. Signed-off-by: Jason Stephenson Signed-off-by: Jason Boyer --- Open-ILS/src/support-scripts/marc_stream_importer.pl.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/support-scripts/marc_stream_importer.pl.in b/Open-ILS/src/support-scripts/marc_stream_importer.pl.in index 4f2a1df80e..72ba08e552 100755 --- a/Open-ILS/src/support-scripts/marc_stream_importer.pl.in +++ b/Open-ILS/src/support-scripts/marc_stream_importer.pl.in @@ -443,7 +443,8 @@ sub process_request { set_tempdir(); # copy data to a temporary file so vandelay can scoop it up - my ($handle, $tempfile) = tempfile("$0_XXXX", DIR => $tempdir) + my $base = fileparse($0, qw(.pl)); + my ($handle, $tempfile) = tempfile("${base}_XXXX", DIR => $tempdir) or die "Cannot create tempfile in $tempdir : $!"; print $handle $data or die "Error writing to tempfile $tempfile : $!\n"; -- 2.11.0