File: 07_691028.diff

package info (click to toggle)
libxml-twig-perl 1%3A3.54-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,044 kB
  • sloc: perl: 21,338; xml: 423; makefile: 13
file content (21 lines) | stat: -rw-r--r-- 657 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Description: Fix xml_grep producing invalid output when input from stdin
Bug-Debian: https://bugs.debian.org/691028
Author: Bart Martens <bartm@debian.org>
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2025-08-23

--- a/tools/xml_grep/xml_grep
+++ b/tools/xml_grep/xml_grep
@@ -127,8 +127,10 @@
      
 my $t= create_twig( %options);
 
-if( @ARGV)
-  { foreach my $file (@ARGV)
+my @files = @ARGV;
+push @files, '-' unless @files; # fixes http://bugs.debian.org/691028
+if( @files)
+  { foreach my $file (@files)
       { $current_file= $file;
 
         if( $nb_results_per_file) { $nb_results_left_in_current_file= $nb_results_per_file; }