[Libreoffice-commits] core.git: bin/gbuild-to-ide

Ashod Nakashian ashodnakashian at yahoo.com
Fri Jan 9 10:22:04 PST 2015


 bin/gbuild-to-ide |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit e52589553caaf05951b8e26b86ed2ebd1a8cae2e
Author: Ashod Nakashian <ashodnakashian at yahoo.com>
Date:   Wed Jan 7 12:53:27 2015 -0500

    Remove extra new-line characters before regex matching in gbuild-to-ide.
    
    At least on some 64-bit Cygwin installations, the input gbuild-to-ide gets
    include \r\n EOL. Python3 regex excludes \n from .* but leaves \r in the matching
    group. This training cr ends up in the file paths in VS project files, breaking
    it as they are invalid characters.
    
    Change-Id: I481c1adbf6f6db7ab0ee0d3a768b7a397dc78ee5
    Reviewed-on: https://gerrit.libreoffice.org/13803
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide
index ea4cde4..3a78d9f 100755
--- a/bin/gbuild-to-ide
+++ b/bin/gbuild-to-ide
@@ -168,6 +168,7 @@ class GbuildParser:
     def parse(self, gbuildstate):
         state = GbuildParserState()
         for line in gbuildstate:
+            line = line.rstrip('\r\n')
             if line.startswith('#'):
                 state = self._parse_hash(line, state)
             else:


More information about the Libreoffice-commits mailing list