[glib] gdbus-codegen: Fix header include in the body file



commit 5faac84413ed67b05d1f6baf9877ff1965d9598b
Author: Iñigo Martínez <inigomartinez gmail com>
Date:   Fri May 4 16:23:18 2018 +0200

    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 = []


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]