[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
Tue Apr 21 10:31:51 CEST 2015


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

--- Comment #15 from M. Tompsett <mtompset at hotmail.com> ---
Comment on attachment 37848
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37848
[Signed-off] Bug 10625: Inventory/Stocktaking tool cannot handle windows file
uploads

Review of attachment 37848:
 --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=10625&attachment=37848)
-----------------------------------------------------------------

::: 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.

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


More information about the Koha-bugs mailing list