diff options
author | Mike Kestner <mkestner@ximian.com> | 2003-03-15 01:19:25 +0800 |
---|---|---|
committer | Mike Kestner <mkestner@src.gnome.org> | 2003-03-15 01:19:25 +0800 |
commit | 0b82cc7a34271a145a45ff7f296304e19a9315cc (patch) | |
tree | 47eae8ff4cff0dbe3a49a3742aca333ff71f6410 /widgets/menus/gal-view-collection.c | |
parent | 7bfabd86905e8b577b2d6492b516650be5075453 (diff) | |
download | gsoc2013-evolution-0b82cc7a34271a145a45ff7f296304e19a9315cc.tar.gz gsoc2013-evolution-0b82cc7a34271a145a45ff7f296304e19a9315cc.tar.zst gsoc2013-evolution-0b82cc7a34271a145a45ff7f296304e19a9315cc.zip |
use access() like camel
2003-03-14 Mike Kestner <mkestner@ximian.com>
* gal/util/e-util.c (e_mkdir_hier): use access() like camel
2003-03-14 Mike Kestner <mkestner@ximian.com>
* gal-view-collection.c (gal_view_collection_load): check failure
on e_create_directory call and warn.
* gal-view-instance.c (save_current_view): check for failure and
warn.
svn path=/trunk/; revision=20291
Diffstat (limited to 'widgets/menus/gal-view-collection.c')
-rw-r--r-- | widgets/menus/gal-view-collection.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/widgets/menus/gal-view-collection.c b/widgets/menus/gal-view-collection.c index b7a571132e..87ac878b83 100644 --- a/widgets/menus/gal-view-collection.c +++ b/widgets/menus/gal-view-collection.c @@ -26,6 +26,7 @@ #include <util/e-i18n.h> #include <ctype.h> #include <string.h> +#include <errno.h> #include <libxml/parser.h> #include <libgnome/gnome-util.h> #include <gal/util/e-util.h> @@ -469,7 +470,8 @@ gal_view_collection_load (GalViewCollection *collection) g_return_if_fail (collection->system_dir != NULL); g_return_if_fail (!collection->loaded); - e_create_directory(collection->local_dir); + if ((e_create_directory(collection->local_dir) == -1) && (errno != EEXIST)) + g_warning ("Unable to create dir %s: %s", collection->local_dir, g_strerror(errno)); load_single_dir(collection, collection->local_dir, TRUE); load_single_dir(collection, collection->system_dir, FALSE); @@ -537,7 +539,8 @@ gal_view_collection_save (GalViewCollection *collection) e_xml_set_string_prop_by_name(child, "type", item->type); } filename = g_concat_dir_and_file(collection->local_dir, "galview.xml"); - e_xml_save_file (filename, doc); + if (e_xml_save_file (filename, doc) == -1) + g_warning ("Unable to save view to %s - %s", filename, g_strerror(errno)); xmlFreeDoc(doc); g_free(filename); } |