[gthumb/ext] Create the catalogs folder if it does not already exist



commit c5ac26de56a590314e9153f54f3d0b4ed93a2f35
Author: Michael J. Chudobiak <mjc avtechpulse com>
Date:   Thu Aug 27 11:18:05 2009 -0400

    Create the catalogs folder if it does not already exist

 extensions/catalogs/gth-catalog.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/extensions/catalogs/gth-catalog.c b/extensions/catalogs/gth-catalog.c
index 7996745..43b7c05 100644
--- a/extensions/catalogs/gth-catalog.c
+++ b/extensions/catalogs/gth-catalog.c
@@ -545,6 +545,9 @@ gth_catalog_get_base (void)
 	/*catalogs_dir = g_strdup ("/home/paolo/.gnome2/gthumb/collections");*/
 	base = g_file_new_for_path (catalogs_dir);
 
+	if (! g_file_query_exists (base, NULL))
+		g_file_make_directory_with_parents (base, NULL, NULL);
+
 	g_free (catalogs_dir);
 
 	return base;



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