[Koha-bugs] [Bug 10625] Inventory/Stocktaking tool cannot handle windows file uploads

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Apr 27 10:56:30 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10625

--- Comment #16 from Jonathan Druart <jonathan.druart at biblibre.com> ---
(In reply to M. Tompsett from comment #15)
> Comment on attachment 37848 [details] [review]
> [Signed-off] Bug 10625: Inventory/Stocktaking tool cannot handle windows
> file uploads
> 
> Review of attachment 37848 [details] [review]:
> -----------------------------------------------------------------
> 
> ::: tools/inventory.pl
> @@ +174,5 @@
> > +        $barcode =~ s/\r/\n/g;
> > +        $barcode =~ s/\n\n/\n/g;
> > +        $barcode =~ s/\n$//;
> > +        $barcode =~ s/^\n//;
> > +        my @data = split(/\n/,$barcode);
> 
> Because then I couldn't split the barcodes.
> I agree the logic might be more optimizable, but the idea is that if
> $barcode = "foo\nbar"; it needs to split into two barcodes: foo and bar. And
> given that some OS's may use \r and \n and \r\n in ways different than how
> $barcode=<$uploadbarcodes> works, I wanted to be certain that all middle
> combinations get split, and that there are no beginning or end strangeness.

Ok sorry, did not read it with the context.
So the last 2 replacements are useless :)

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list