aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/component-factory.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/component-factory.c')
-rw-r--r--calendar/gui/component-factory.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/calendar/gui/component-factory.c b/calendar/gui/component-factory.c
index 60d31590f3..2e7c6945e5 100644
--- a/calendar/gui/component-factory.c
+++ b/calendar/gui/component-factory.c
@@ -416,6 +416,7 @@ xfer_folder (EvolutionShellComponent *shell_component,
GnomeVFSURI *src_uri;
GnomeVFSURI *dest_uri;
GnomeVFSResult result;
+ char *filename, *backup_filename;
CORBA_exception_init (&ev);
@@ -443,9 +444,20 @@ xfer_folder (EvolutionShellComponent *shell_component,
return;
}
- result = xfer_file (src_uri, dest_uri, "calendar.ics", remove_source);
+ if (strcmp (type, FOLDER_CALENDAR) == 0) {
+ filename = "calendar.ics";
+ backup_filename = "calendar.ics~";
+ } else if (strcmp (type, FOLDER_TASKS) == 0) {
+ filename = "tasks.ics";
+ backup_filename = "tasks.ics~";
+ } else {
+ g_assert_not_reached ();
+ return;
+ }
+
+ result = xfer_file (src_uri, dest_uri, filename, remove_source);
if (result == GNOME_Evolution_ShellComponentListener_OK)
- result = xfer_file (src_uri, dest_uri, "calendar.ics~", remove_source);
+ result = xfer_file (src_uri, dest_uri, backup_filename, remove_source);
GNOME_Evolution_ShellComponentListener_notifyResult (listener, result, &ev);