From 5faac84413ed67b05d1f6baf9877ff1965d9598b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1igo=20Mart=C3=ADnez?= Date: Fri, 4 May 2018 16:23:18 +0200 Subject: [PATCH] gdbus-codegen: Fix header include in the body file When body file is generated, the header name to be included is built by using the path passed by `--output` directory. However, this might not be correct because, if the path includes a subdirectory, the whole path will be used instead of only the base name. Please see: https://github.com/mesonbuild/meson/issues/3488 https://github.com/gnome-mpv/gnome-mpv/issues/305#issuecomment-385056156 https://bugzilla.gnome.org/show_bug.cgi?id=795802 --- gio/gdbus-2.0/codegen/codegen_main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gio/gdbus-2.0/codegen/codegen_main.py b/gio/gdbus-2.0/codegen/codegen_main.py index 84ee63dbe..65876a2e8 100755 --- a/gio/gdbus-2.0/codegen/codegen_main.py +++ b/gio/gdbus-2.0/codegen/codegen_main.py @@ -209,7 +209,7 @@ def codegen_main(): print_error('Using --body requires --output') c_file = args.output - header_name = os.path.splitext(c_file)[0] + '.h' + header_name = os.path.splitext(os.path.basename(c_file))[0] + '.h' all_ifaces = [] input_files_basenames = []