diff options
author | Ashod Nakashian <ashodnakashian@yahoo.com> | 2015-01-07 12:53:27 -0500 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-01-09 18:21:36 +0000 |
commit | e52589553caaf05951b8e26b86ed2ebd1a8cae2e (patch) | |
tree | 938ec51bd375f2552a27535b67a77c66ffffcb7b | |
parent | b7d07699c8142e33f9d05d4e203b6fb567f36a9b (diff) |
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@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rwxr-xr-x | bin/gbuild-to-ide | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide index ea4cde4f8024..3a78d9fb6a6a 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: |