diff options
author | Hans Petter Jansson <hpj@ximian.com> | 2003-02-11 05:49:11 +0800 |
---|---|---|
committer | Hans Petter <hansp@src.gnome.org> | 2003-02-11 05:49:11 +0800 |
commit | 46e6fb3e66990e0eef417121df9bc2fc71d7f4ca (patch) | |
tree | 0ea8d99894cae95ab51ae101b8a578ac2bfa539d | |
parent | 36d90739a4c2a3babf0497c0e474e2383d639a5d (diff) | |
download | gsoc2013-evolution-46e6fb3e66990e0eef417121df9bc2fc71d7f4ca.tar gsoc2013-evolution-46e6fb3e66990e0eef417121df9bc2fc71d7f4ca.tar.gz gsoc2013-evolution-46e6fb3e66990e0eef417121df9bc2fc71d7f4ca.tar.bz2 gsoc2013-evolution-46e6fb3e66990e0eef417121df9bc2fc71d7f4ca.tar.lz gsoc2013-evolution-46e6fb3e66990e0eef417121df9bc2fc71d7f4ca.tar.xz gsoc2013-evolution-46e6fb3e66990e0eef417121df9bc2fc71d7f4ca.tar.zst gsoc2013-evolution-46e6fb3e66990e0eef417121df9bc2fc71d7f4ca.zip |
Don't try to make an error string from an uninitialized GnomeVFSResult.
2003-02-10 Hans Petter Jansson <hpj@ximian.com>
* pcs/cal-backend-file.c (save): Don't try to make an error string
from an uninitialized GnomeVFSResult.
svn path=/trunk/; revision=19880
-rw-r--r-- | calendar/ChangeLog | 5 | ||||
-rw-r--r-- | calendar/pcs/cal-backend-file.c | 14 |
2 files changed, 15 insertions, 4 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index ea0df608cc..8c36fc332e 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,8 @@ +2003-02-10 Hans Petter Jansson <hpj@ximian.com> + + * pcs/cal-backend-file.c (save): Don't try to make an error string + from an uninitialized GnomeVFSResult. + 2003-02-10 Ettore Perazzoli <ettore@ximian.com> * gui/Makefile.am: Make the CORBA IDL compilation work with diff --git a/calendar/pcs/cal-backend-file.c b/calendar/pcs/cal-backend-file.c index 242904fb48..a0d9453b3b 100644 --- a/calendar/pcs/cal-backend-file.c +++ b/calendar/pcs/cal-backend-file.c @@ -24,6 +24,7 @@ #include <string.h> #include <bonobo/bonobo-exception.h> #include <bonobo/bonobo-moniker-util.h> +#include <libgnome/gnome-i18n.h> #include <libgnomevfs/gnome-vfs.h> #include "e-util/e-dbhash.h" #include "cal-util/cal-recur.h" @@ -247,13 +248,13 @@ save (CalBackendFile *cbfile) uri = gnome_vfs_uri_new (priv->uri); if (!uri) - goto error; + goto error_malformed_uri; /* save calendar to backup file */ tmp = gnome_vfs_uri_to_string (uri, GNOME_VFS_URI_HIDE_NONE); if (!tmp) { gnome_vfs_uri_unref (uri); - goto error; + goto error_malformed_uri; } backup_uristr = g_strconcat (tmp, "~", NULL); @@ -264,7 +265,7 @@ save (CalBackendFile *cbfile) if (!backup_uri) { gnome_vfs_uri_unref (uri); - goto error; + goto error_malformed_uri; } result = gnome_vfs_create_uri (&handle, backup_uri, @@ -294,7 +295,12 @@ save (CalBackendFile *cbfile) goto error; return; - + + error_malformed_uri: + cal_backend_notify_error (CAL_BACKEND (cbfile), + _("Can't save calendar data: Malformed URI.")); + return; + error: cal_backend_notify_error (CAL_BACKEND (cbfile), gnome_vfs_result_to_string (result)); return; |