From: Victor Julien Date: Fri, 29 Mar 2019 14:10:00 +0000 (+0100) Subject: rust/mingw: fix C glue code generator X-Git-Tag: suricata-5.0.0-beta1~95 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3762%2Fhead;p=thirdparty%2Fsuricata.git rust/mingw: fix C glue code generator --- diff --git a/rust/gen-c-headers.py b/rust/gen-c-headers.py index cfe303671b..b3eceb5c07 100755 --- a/rust/gen-c-headers.py +++ b/rust/gen-c-headers.py @@ -139,7 +139,9 @@ def convert_type(rs_type): raise Exception("Failed to parse Rust type: %s" % (rs_type)) def make_output_filename(filename): - parts = filename.split(os.path.sep)[2:] + if filename.startswith("./"): + filename = filename[2:] + parts = filename.split(os.path.sep)[1:] last = os.path.splitext(parts.pop())[0] outpath = "./gen/c-headers/rust-%s-%s-gen.h" % ( "-".join(parts), last)