Bugzilla – Attachment 30899 Details for
Bug 4162
Inventory Tool Fails Silently
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 4162 - Followup: only count potential barcodes
Bug-4162---Followup-only-count-potential-barcodes.patch (text/plain), 1.17 KB, created by
Mark Tompsett
on 2014-08-17 22:49:05 UTC
(
hide
)
Description:
Bug 4162 - Followup: only count potential barcodes
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2014-08-17 22:49:05 UTC
Size:
1.17 KB
patch
obsolete
>From 3100918ad30ca63b488f622dc9a6414609038c22 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Sun, 17 Aug 2014 18:44:04 -0400 >Subject: [PATCH] Bug 4162 - Followup: only count potential barcodes > >The $lines_read++; was before the code which skipped empty >lines. By moving it after the next unless $barcode; code, the >$lines_read variable only counts potential barcodes, and does >not include empty lines. > >TEST PLAN >--------- >1) Apply patch. >2) Attempt a valid barcode file with empty lines. > -- The potential barcode count should exclude the empty lines. >--- > tools/inventory.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/tools/inventory.pl b/tools/inventory.pl >index 0255949..6a5ddc4 100755 >--- a/tools/inventory.pl >+++ b/tools/inventory.pl >@@ -170,9 +170,9 @@ if ( $uploadbarcodes && length($uploadbarcodes) > 0 ) { > my $lines_read=0; > binmode($uploadbarcodes, ":encoding(UTF-8)"); > while (my $barcode=<$uploadbarcodes>){ >- ++$lines_read; > $barcode =~ s/\r?\n$//; > next unless $barcode; >+ ++$lines_read; > if (length($barcode)>$barcode_size) { > $err_length += 1; > } >-- >1.7.9.5
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 4162
:
29659
|
29660
|
30548
|
30841
|
30880
|
30891
|
30899
|
30922