[glib] gschema-compile: output to srcdir by default



commit f82839b8fe6e112b9cc02637e7544e800524c179
Author: Ryan Lortie <desrt desrt ca>
Date:   Tue Apr 20 17:27:17 2010 -0400

    gschema-compile: output to srcdir by default
    
    If the target directory is not explicitly set then output to the source
    directory.  Closes bug #616311 reported by Bastien Nocera.

 gio/gschema-compile.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gio/gschema-compile.c b/gio/gschema-compile.c
index 1e31fae..7516e6e 100644
--- a/gio/gschema-compile.c
+++ b/gio/gschema-compile.c
@@ -515,10 +515,11 @@ main (int argc, char **argv)
     }
 
   srcdir = argv[1];
-  if (targetdir)
-    target = g_build_filename (targetdir, "gschemas.compiled", NULL);
-  else
-    target = "gschemas.compiled";
+
+  if (targetdir == NULL)
+    targetdir = srcdir;
+
+  target = g_build_filename (targetdir, "gschemas.compiled", NULL);
 
   dir = g_dir_open (srcdir, 0, &error);
   if (dir == NULL)



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