aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs/cal-backend-file.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@helixcode.com>2000-10-21 05:25:47 +0800
committerJP Rosevear <jpr@src.gnome.org>2000-10-21 05:25:47 +0800
commit1fff2516257a785bb4597c7ad4917405bbcb8cbc (patch)
tree5f04a3c3f2e079e42fb4bacde631b340d84f6973 /calendar/pcs/cal-backend-file.c
parent88cbebbb3d5c27eccf5935208a90389fe608fa7f (diff)
downloadgsoc2013-evolution-1fff2516257a785bb4597c7ad4917405bbcb8cbc.tar
gsoc2013-evolution-1fff2516257a785bb4597c7ad4917405bbcb8cbc.tar.gz
gsoc2013-evolution-1fff2516257a785bb4597c7ad4917405bbcb8cbc.tar.bz2
gsoc2013-evolution-1fff2516257a785bb4597c7ad4917405bbcb8cbc.tar.lz
gsoc2013-evolution-1fff2516257a785bb4597c7ad4917405bbcb8cbc.tar.xz
gsoc2013-evolution-1fff2516257a785bb4597c7ad4917405bbcb8cbc.tar.zst
gsoc2013-evolution-1fff2516257a785bb4597c7ad4917405bbcb8cbc.zip
Pulling up stuff from the 0.6 branch
2000-10-20 JP Rosevear <jpr@helixcode.com> * pcs/cal-backend.c (cal_backend_destroy): New destroy handler to properly stop the timer, sync the log and unref the URI. (cal_backend_last_client_gone): Just emit the signal, clean up work is done in cal_backend_destroy now. * pcs/cal-backend-file.c (cal_backend_file_load): Unref the uri we are replacing NOT the new uri. 2000-10-20 JP Rosevear <jpr@helixcode.com> * conduits/todo/Makefile.am: Fix build * conduits/calendar/Makefile.am: Fix build 2000-10-20 JP Rosevear <jpr@helixcode.com> * conduits/calendar/calendar-conduit.c (delete_archive_record): Don't throw an error * conduits/todo/todo-conduit.c (delete_archive_record): ditto 2000-10-20 JP Rosevear <jpr@helixcode.com> * conduits/todo/todo-conduit-control-applet.c: Add defines * conduits/todo/todo-conduit-config.h: put #ifdefs around functions can't make this a public interface in the usual way as then the symbols would be exported * conduits/todo/todo-conduit.c: Kill warnings. clahey will be happy! Add some defines to include only the necessary config functions. (conduit_get_gpilot_conduit): Hook up archive signals * conduits/calendar/calendar-conduit.c: Same as above * conduits/calendar/calendar-conduit-control-applet.c: ditto * conduits/calendar/calendar-conduit-config.h: ditto svn path=/trunk/; revision=6086
Diffstat (limited to 'calendar/pcs/cal-backend-file.c')
-rw-r--r--calendar/pcs/cal-backend-file.c39
1 files changed, 14 insertions, 25 deletions
diff --git a/calendar/pcs/cal-backend-file.c b/calendar/pcs/cal-backend-file.c
index 97e96d3d44..715e1e70bc 100644
--- a/calendar/pcs/cal-backend-file.c
+++ b/calendar/pcs/cal-backend-file.c
@@ -183,29 +183,21 @@ save (CalBackendFile *cbfile)
g_assert (priv->icalcomp != NULL);
/* Make a backup copy of the file if it exists */
- if (gnome_vfs_uri_exists (priv->uri)) {
- tmp = gnome_vfs_uri_to_string (priv->uri, GNOME_VFS_URI_HIDE_NONE);
- if (tmp) {
- GnomeVFSURI *backup_uri;
- gchar *backup_uristr;
-
- backup_uristr = g_strconcat (tmp, "~", NULL);
- backup_uri = gnome_vfs_uri_new (backup_uristr);
-
- result = gnome_vfs_move_uri (priv->uri, backup_uri, TRUE);
- gnome_vfs_uri_unref (backup_uri);
-
- g_free (tmp);
- g_free (backup_uristr);
- }
- } else {
- result = GNOME_VFS_OK;
+ tmp = gnome_vfs_uri_to_string (priv->uri, GNOME_VFS_URI_HIDE_NONE);
+ if (tmp) {
+ GnomeVFSURI *backup_uri;
+ gchar *backup_uristr;
+
+ backup_uristr = g_strconcat (tmp, "~", NULL);
+ backup_uri = gnome_vfs_uri_new (backup_uristr);
+
+ result = gnome_vfs_move_uri (priv->uri, backup_uri, TRUE);
+ gnome_vfs_uri_unref (backup_uri);
+
+ g_free (tmp);
+ g_free (backup_uristr);
}
-
- if (result != GNOME_VFS_OK)
- goto error;
-
/* Now write the new file out */
result = gnome_vfs_create_uri (&handle, priv->uri,
GNOME_VFS_OPEN_WRITE,
@@ -616,9 +608,6 @@ cal_backend_file_load (CalBackend *backend, GnomeVFSURI *uri)
if (!gnome_vfs_uri_is_local (uri))
return CAL_BACKEND_LOAD_ERROR;
- if (!gnome_vfs_uri_exists (uri))
- return CAL_BACKEND_LOAD_ERROR;;
-
str_uri = gnome_vfs_uri_to_string (uri,
(GNOME_VFS_URI_HIDE_USER_NAME
| GNOME_VFS_URI_HIDE_PASSWORD
@@ -659,7 +648,7 @@ cal_backend_file_load (CalBackend *backend, GnomeVFSURI *uri)
/* Clean up */
if (priv->uri)
- gnome_vfs_uri_unref (uri);
+ gnome_vfs_uri_unref (priv->uri);
gnome_vfs_uri_ref (uri);
priv->uri = uri;