From 6a2d1b117092dd984765346abcd5d75f4ea54032 Mon Sep 17 00:00:00 2001 From: Sushma Rai Date: Wed, 14 Dec 2005 12:14:51 +0000 Subject: Proceeding with the import activity only if the book is writable. Fixes #266003. svn path=/trunk/; revision=30772 --- addressbook/importers/evolution-ldif-importer.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'addressbook/importers/evolution-ldif-importer.c') 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"); -- cgit v1.2.3