Fix for Bug 4451 Batch item tool can't process file with Windows line endings
authorOwen Leonard <oleonard@myacpl.org>
Sat, 13 Nov 2010 17:58:54 +0000 (12:58 -0500)
committerChris Cormack <chrisc@catalyst.net.nz>
Tue, 30 Nov 2010 01:29:04 +0000 (14:29 +1300)
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
tools/batchMod.pl

index 7c03812..84d1ae1 100755 (executable)
@@ -169,7 +169,7 @@ if ($op eq "show"){
     my @contentlist;
     if ($filefh){
         while (my $content=<$filefh>){
-            chomp $content;
+            $content =~ s/[\r\n]*$//g;
             push @contentlist, $content if $content;
         }