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:
Stephen Street 2016-06-09 12:08:57 -07:00 committed by Daniel Agar
parent 29eac9b7cb
commit 039d5528dd
1 changed files with 1 additions and 1 deletions

View File

@ -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: