mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-05 00:41:36 +08:00
DSDLC compiler fix for Windows - libuavcan_dsdl_compiler.pretty_filename()
This commit is contained in:
@@ -64,9 +64,12 @@ def run(source_dirs, include_dirs, output_dir):
|
|||||||
# -----------------
|
# -----------------
|
||||||
|
|
||||||
def pretty_filename(filename):
|
def pretty_filename(filename):
|
||||||
a = os.path.abspath(filename)
|
try:
|
||||||
r = os.path.relpath(filename)
|
a = os.path.abspath(filename)
|
||||||
return a if len(a) < len(r) else r
|
r = os.path.relpath(filename)
|
||||||
|
return a if len(a) < len(r) else r
|
||||||
|
except ValueError:
|
||||||
|
return filename # Fails on Windows "Cannot mix UNC and non-UNC paths", investigate someday later
|
||||||
|
|
||||||
def type_output_filename(t):
|
def type_output_filename(t):
|
||||||
assert t.category == t.CATEGORY_COMPOUND
|
assert t.category == t.CATEGORY_COMPOUND
|
||||||
|
|||||||
Reference in New Issue
Block a user