sysui/desktop/share/brand.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit 54df1aa066d86d9bd04fc37c6e1fabc436ddcf2c Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Thu Apr 2 12:04:56 2020 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Thu Apr 2 13:13:39 2020 +0200 Fix Perl loop reading a list of file names from the command line while (<>) { ... } opens all the file names given on the command line in succession, and executes the loop body once for every line read from those files. So the existing loop processed each file over and over N times, where N is the number of lines in that file. This appears to have been broken ever since the code's introduction in be63ae6cba16a0e31c1388cd5e0bc418cb41afd6 "INTEGRATION: CWS networker3 (1.1.2); FILE ADDED: 2004/05/20 11:38:58 obr 1.1.2.1: #i20355#,#i20356# new directories for system wide desktop integration". Change-Id: I8b4f0c6812bf3ba42da4b7c55c38e52c91dd4229 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91558 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/sysui/desktop/share/brand.pl b/sysui/desktop/share/brand.pl index 2be723b30514..9d73e619c495 100644 --- a/sysui/desktop/share/brand.pl +++ b/sysui/desktop/share/brand.pl @@ -64,13 +64,13 @@ while ($_ = $ARGV[0], /^-/) { } -while (<>) { - unless (open INFILE,$ARGV) { - print STDOUT "Can't open input file $ARGV: $!\n"; +while ($arg = shift) { + unless (open INFILE,$arg) { + print STDOUT "Can't open input file $arg: $!\n"; exit 1; } - $srcfile = substr($ARGV, rindex($ARGV, "/") + 1); + $srcfile = substr($arg, rindex($arg, "/") + 1); unless (open OUTFILE,"> $destdir/$prefix$srcfile") { print STDOUT "Can't open output file $destdir/$prefix$srcfile: $!\n"; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits