[Libreoffice-commits] core.git: Branch 'feature/calc-group-interpreter' - solenv/bin

Michael Meeks michael.meeks at suse.com
Thu May 23 03:33:45 PDT 2013


 solenv/bin/modules/installer/control.pm |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit f91b7954fabb2f19e48e6407b577225534d2c0bb
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Thu May 23 11:32:33 2013 +0100

    further cleanup to tolerate DOS line endings.
    
    Change-Id: I60345ed3eed84ef197bf145f2b26dfa8afdc51b1

diff --git a/solenv/bin/modules/installer/control.pm b/solenv/bin/modules/installer/control.pm
index 67dd193..a45ffcd 100644
--- a/solenv/bin/modules/installer/control.pm
+++ b/solenv/bin/modules/installer/control.pm
@@ -431,8 +431,10 @@ sub read_lcidlist
     for ( my $i = 0; $i <= $#{$lcidlist}; $i++ )
     {
         my $line = ${$lcidlist}[$i];
-
-        $line =~ s/\#.*$//; # removing comments after "#"
+        # de-mangle various potential DOS line-ending problems
+        $line =~ s/\r//g;
+        $line =~ s/\n//g;
+        $line =~ s/\s*\#.*$//; # removing comments after "#"
         if ( $line =~ /^\s*$/ ) { next; }  # this is an empty line
 
         if ( $line =~ /^\s*([\w-]+)\s+(\d+)\s+(\d+)\s*$/ )


More information about the Libreoffice-commits mailing list