gstdoc-scangobj: abort with an error if we couldn't open a file for writing
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 17 Jun 2010 14:37:14 +0000 (15:37 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Thu, 17 Jun 2010 14:37:14 +0000 (15:37 +0100)
gstdoc-scangobj

index 9cd5018..637bacb 100755 (executable)
@@ -208,6 +208,10 @@ get_object_types (void)
       inspect_name = g_strdup_printf ("$INSPECT_DIR" G_DIR_SEPARATOR_S "plugin-%s.xml",
           plugin->desc.name);
       inspect = fopen (inspect_name, "w");
+      if (inspect == NULL) {
+        g_error ("Could not open %s for writing: %s\\n", inspect_name,
+            g_strerror (errno));
+      }
       g_free (inspect_name);
       
       /* output plugin data */