Bugzilla – Attachment 44011 Details for
Bug 15032
[Plack] Scripts that fork (like stage-marc-import.pl) don't work as expected
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[OBSOLETE?] Bug 15032: Make sure the filehandle is not close on background mode
Bug-15032-Make-sure-the-filehandle-is-not-close-on.patch (text/plain), 1.25 KB, created by
Jonathan Druart
on 2015-10-26 16:28:18 UTC
(
hide
)
Description:
[OBSOLETE?] Bug 15032: Make sure the filehandle is not close on background mode
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-10-26 16:28:18 UTC
Size:
1.25 KB
patch
obsolete
>From 645e44dbd61c36dc084623d68999a1e5ac5b503d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 26 Oct 2015 16:22:56 +0000 >Subject: [PATCH] Bug 15032: Make sure the filehandle is not close on > background mode > >With Plack, when a file is uploaded for import, the fh created on >this file in Koha::Upload is closed. >To be sure we are using an opened one, we need to open it in the current >scope. > >Test plan: >1) Go to Tools --> Stage MARC records for import. >2) Upload file and click Import. >3) Click Stage for Import. >You should not get any error and the records have been correctly >staged. >--- > tools/stage-marc-import.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/tools/stage-marc-import.pl b/tools/stage-marc-import.pl >index 8d94cdd..8b73877 100755 >--- a/tools/stage-marc-import.pl >+++ b/tools/stage-marc-import.pl >@@ -85,7 +85,7 @@ if ($completedJobID) { > $template->param(map { $_ => $results->{$_} } keys %{ $results }); > } elsif ($fileID) { > my $upload = Koha::Upload->new->get({ id => $fileID, filehandle => 1 }); >- my $fh = $upload->{fh}; >+ open my $fh, '<', $upload->{path}; > my $filename = $upload->{name}; # filename only, no path > my $marcrecord=''; > $/ = "\035"; >-- >2.1.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15032
:
43625
| 44011 |
61649