aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/importers/icalendar-importer.c
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2001-10-30 04:08:39 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2001-10-30 04:08:39 +0800
commitf828accd314674f31de652bf4cd5d0b5e136f9ab (patch)
treed5059283e0b166bf916a35b549657d3fd485640d /calendar/importers/icalendar-importer.c
parentdf5427ac094df5011fe6decec383c3e71a8c68a3 (diff)
downloadgsoc2013-evolution-f828accd314674f31de652bf4cd5d0b5e136f9ab.tar
gsoc2013-evolution-f828accd314674f31de652bf4cd5d0b5e136f9ab.tar.gz
gsoc2013-evolution-f828accd314674f31de652bf4cd5d0b5e136f9ab.tar.bz2
gsoc2013-evolution-f828accd314674f31de652bf4cd5d0b5e136f9ab.tar.lz
gsoc2013-evolution-f828accd314674f31de652bf4cd5d0b5e136f9ab.tar.xz
gsoc2013-evolution-f828accd314674f31de652bf4cd5d0b5e136f9ab.tar.zst
gsoc2013-evolution-f828accd314674f31de652bf4cd5d0b5e136f9ab.zip
fixed URI construction, which was preventing importing into the root
2001-10-29 Rodrigo Moya <rodrigo@ximian.com> * importers/icalendar-importer.c (load_file_fn): fixed URI construction, which was preventing importing into the root calendar (~/evo/local/Calendar/) svn path=/trunk/; revision=14358
Diffstat (limited to 'calendar/importers/icalendar-importer.c')
-rw-r--r--calendar/importers/icalendar-importer.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/calendar/importers/icalendar-importer.c b/calendar/importers/icalendar-importer.c
index ab3cffcfa2..262c925b74 100644
--- a/calendar/importers/icalendar-importer.c
+++ b/calendar/importers/icalendar-importer.c
@@ -120,9 +120,12 @@ load_file_fn (EvolutionImporter *importer,
char *parent;
name = strrchr (folderpath, '/');
- if (!name) {
+ if (name == NULL || name == folderpath) {
parent = g_strdup ("evolution/local/");
- name = folderpath;
+ if (folderpath[0] == '/')
+ name = folderpath + 1;
+ else
+ name = folderpath;
}
else {
name += 1;