asn2wrs.py: fix path substitution when generating ASN.1 dissectors with CMake on...
authorPascal Quantin <pascal.quantin@gmail.com>
Sun, 22 Nov 2015 09:01:28 +0000 (10:01 +0100)
committerPascal Quantin <pascal.quantin@gmail.com>
Sun, 22 Nov 2015 11:30:54 +0000 (11:30 +0000)
Change-Id: I48e7d48544274f27d276e7128f8d2a2727c0b9cd
Reviewed-on: https://code.wireshark.org/review/12031
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
tools/asn2wrs.py

index 064029798f88329509690589988b62615e31be08..cbeb49f8817b7bde97a6521385e3153fe2d42b3f 100755 (executable)
@@ -2943,8 +2943,8 @@ class EthOut:
         out = out.replace('\\', '/')
         # Change absolute paths and relative paths generated outside
         # source directory to paths relative to asn1/<proto> subdir.
-        out = re.sub(r'(\s)[./]\S*(/tools/|/epan/)', r'\1../..\2', out)
-        out = re.sub(r'(\s)[./]\S*/asn1/\S*?([\s/])', r'\1.\2', out)
+        out = re.sub(r'(\s)[./A-Z]\S*(/tools/|/epan/)', r'\1../..\2', out)
+        out = re.sub(r'(\s)[./A-Z]\S*/asn1/\S*?([\s/])', r'\1.\2', out)
         return out
 
     #--- dbg_print -------------------------------------------------------