From 039d5528ddfba211d07d3e970d0e6d2922ea1765 Mon Sep 17 00:00:00 2001 From: Stephen Street Date: Thu, 9 Jun 2016 12:08:57 -0700 Subject: [PATCH] Change prefix construction to allow correct building of scope tag in parameters.xml when building out-of-tree (#4781) Fixes issue #4767 --- Tools/px4params/srcscanner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/px4params/srcscanner.py b/Tools/px4params/srcscanner.py index 2b5f5f3fb0..085c956139 100644 --- a/Tools/px4params/srcscanner.py +++ b/Tools/px4params/srcscanner.py @@ -33,7 +33,7 @@ class SourceScanner(object): Scans provided file and passes its contents to the parser using parser.Parse method. """ - prefix = ".." + os.path.sep + "src" + os.path.sep + prefix = "^.*" + os.path.sep + "src" + os.path.sep scope = re.sub(prefix.replace("\\", "/"), "", os.path.dirname(os.path.relpath(path)).replace("\\", "/")) with codecs.open(path, 'r', 'utf-8') as f: