mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-01 04:01:37 +08:00
Change prefix construction to allow correct building of scope tag in parameters.xml when building out-of-tree (#4781)
Fixes issue #4767
This commit is contained in:
committed by
Daniel Agar
parent
29eac9b7cb
commit
039d5528dd
@@ -33,7 +33,7 @@ class SourceScanner(object):
|
|||||||
Scans provided file and passes its contents to the parser using
|
Scans provided file and passes its contents to the parser using
|
||||||
parser.Parse method.
|
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("\\", "/"))
|
scope = re.sub(prefix.replace("\\", "/"), "", os.path.dirname(os.path.relpath(path)).replace("\\", "/"))
|
||||||
|
|
||||||
with codecs.open(path, 'r', 'utf-8') as f:
|
with codecs.open(path, 'r', 'utf-8') as f:
|
||||||
|
|||||||
Reference in New Issue
Block a user