mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 06:33:35 +08:00
srcscanner.py replace windows slashes
This commit is contained in:
committed by
Lorenz Meier
parent
8e130c878c
commit
194b48b50a
@@ -34,7 +34,8 @@ class SourceScanner(object):
|
||||
parser.Parse method.
|
||||
"""
|
||||
prefix = ".." + os.path.sep + "src" + os.path.sep
|
||||
scope = re.sub(prefix, '', os.path.dirname(os.path.relpath(path)))
|
||||
scope = re.sub(prefix.replace("\\", "/"), "", os.path.dirname(os.path.relpath(path)).replace("\\", "/"))
|
||||
|
||||
with codecs.open(path, 'r', 'utf-8') as f:
|
||||
try:
|
||||
contents = f.read()
|
||||
|
||||
Reference in New Issue
Block a user