[tracker/wip/carlosg/domain-ontologies: 68/124] docs: Ensure to create the output dir in ttl2sgml
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/domain-ontologies: 68/124] docs: Ensure to create the output dir in ttl2sgml
- Date: Thu, 29 Jun 2017 18:44:50 +0000 (UTC)
commit 75e196b236f3537dddb7951e27f3de5641c61649
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Jun 22 14:23:40 2017 +0200
docs: Ensure to create the output dir in ttl2sgml
docs/tools/ttl2sgml.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/docs/tools/ttl2sgml.c b/docs/tools/ttl2sgml.c
index f3b46bc..cc0de0c 100644
--- a/docs/tools/ttl2sgml.c
+++ b/docs/tools/ttl2sgml.c
@@ -103,6 +103,7 @@ main (gint argc, gchar **argv)
OntologyDescription *description = NULL;
GList *description_files, *l;
GFile *ontology_file, *output_file;
+ gchar *path;
/* Translators: this messagge will apper immediately after the */
/* usage string - Usage: COMMAND [OPTION]... <THIS_MESSAGE> */
@@ -127,8 +128,8 @@ main (gint argc, gchar **argv)
return -1;
}
- ontology_file = g_file_new_for_path (ontology_dir);
- output_file = g_file_new_for_path (output_dir);
+ ontology_file = g_file_new_for_commandline_arg (ontology_dir);
+ output_file = g_file_new_for_commandline_arg (output_dir);
description_files = get_description_files (ontology_file);
if (!description_files) {
@@ -136,6 +137,10 @@ main (gint argc, gchar **argv)
return -1;
}
+ path = g_file_get_path (output_file);
+ g_mkdir_with_parents (path, 0755);
+ g_free (path);
+
ontology = ttl_loader_new_ontology ();
for (l = description_files; l; l = l->next) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]