aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/importers/evolution-ldif-importer.c
diff options
context:
space:
mode:
authorSushma Rai <rsushma@src.gnome.org>2005-12-14 20:14:51 +0800
committerSushma Rai <rsushma@src.gnome.org>2005-12-14 20:14:51 +0800
commit6a2d1b117092dd984765346abcd5d75f4ea54032 (patch)
tree82a2dc7be3aeb1f818d6f8bacec3be9677047090 /addressbook/importers/evolution-ldif-importer.c
parentd25e67dc074084669459a5614f9d0dbb4c27e92e (diff)
downloadgsoc2013-evolution-6a2d1b117092dd984765346abcd5d75f4ea54032.tar
gsoc2013-evolution-6a2d1b117092dd984765346abcd5d75f4ea54032.tar.gz
gsoc2013-evolution-6a2d1b117092dd984765346abcd5d75f4ea54032.tar.bz2
gsoc2013-evolution-6a2d1b117092dd984765346abcd5d75f4ea54032.tar.lz
gsoc2013-evolution-6a2d1b117092dd984765346abcd5d75f4ea54032.tar.xz
gsoc2013-evolution-6a2d1b117092dd984765346abcd5d75f4ea54032.tar.zst
gsoc2013-evolution-6a2d1b117092dd984765346abcd5d75f4ea54032.zip
Proceeding with the import activity only if the book is writable.
Fixes #266003. svn path=/trunk/; revision=30772
Diffstat (limited to 'addressbook/importers/evolution-ldif-importer.c')
-rw-r--r--addressbook/importers/evolution-ldif-importer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/addressbook/importers/evolution-ldif-importer.c b/addressbook/importers/evolution-ldif-importer.c
index dfec5dfc51..02607e8cb5 100644
--- a/addressbook/importers/evolution-ldif-importer.c
+++ b/addressbook/importers/evolution-ldif-importer.c
@@ -702,6 +702,13 @@ ldif_import(EImport *ei, EImportTarget *target, EImportImporter *im)
return;
}
+ if (!e_book_is_writable (book)) {
+ g_message(G_STRLOC ":Book is readonly");
+ e_import_complete(ei, target);
+ g_object_unref(book);
+ return;
+ }
+
filename = g_filename_from_uri(s->uri_src, NULL, NULL);
if (filename != NULL) {
file = g_fopen(filename, "r");