mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
DSDLC compiler fix for Windows - libuavcan_dsdl_compiler.pretty_filename()
This commit is contained in:
parent
c0d3b3f2b0
commit
f51ee9cdec
@ -64,9 +64,12 @@ def run(source_dirs, include_dirs, output_dir):
|
||||
# -----------------
|
||||
|
||||
def pretty_filename(filename):
|
||||
a = os.path.abspath(filename)
|
||||
r = os.path.relpath(filename)
|
||||
return a if len(a) < len(r) else r
|
||||
try:
|
||||
a = os.path.abspath(filename)
|
||||
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):
|
||||
assert t.category == t.CATEGORY_COMPOUND
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user