mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-05 01:40:35 +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
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user