aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/menus/gal-view-collection.c7
-rw-r--r--widgets/menus/gal-view-instance.c4
2 files changed, 8 insertions, 3 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);
}
diff --git a/widgets/menus/gal-view-instance.c b/widgets/menus/gal-view-instance.c
index cda202f552..c26eadb5df 100644
--- a/widgets/menus/gal-view-instance.c
+++ b/widgets/menus/gal-view-instance.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>
@@ -92,7 +93,8 @@ save_current_view (GalViewInstance *instance)
if (instance->current_type)
e_xml_set_string_prop_by_name (root, "current_view_type", instance->current_type);
- e_xml_save_file (instance->current_view_filename, doc);
+ if (e_xml_save_file (instance->current_view_filename, doc) == -1)
+ g_warning ("Unable to save view to %s - %s", instance->current_view_filename, g_strerror(errno));
xmlFreeDoc(doc);
}