From 217f85b9017e614505bf4a654d5b282921ff0d9e Mon Sep 17 00:00:00 2001 From: Nickolay V. Shmyrev Date: Sun, 08 Oct 2006 07:29:56 +0000 Subject: Load document even if extension is wrong. 2006-10-08 Nickolay V. Shmyrev * backend/ev-document-factory.c: (ev_document_factory_get_document): Load document even if extension is wrong. --- (limited to 'backend') diff --git a/backend/ev-document-factory.c b/backend/ev-document-factory.c index 3b3f701..a2ea526 100644 --- a/backend/ev-document-factory.c +++ b/backend/ev-document-factory.c @@ -291,21 +291,19 @@ ev_document_factory_get_document (const char *uri, GError **error) document = get_document_from_uri (uri, FALSE, error); - if (*error != NULL) { - return NULL; - } - - result = ev_document_load (document, uri, error); - - if (result == FALSE || *error) { - if (*error && - (*error)->domain == EV_DOCUMENT_ERROR && - (*error)->code == EV_DOCUMENT_ERROR_ENCRYPTED) + if (*error == NULL) { + result = ev_document_load (document, uri, error); + + if (result == FALSE || *error) { + if (*error && + (*error)->domain == EV_DOCUMENT_ERROR && + (*error)->code == EV_DOCUMENT_ERROR_ENCRYPTED) + return document; + } else { return document; - } else { - return document; + } } - + /* Try again with slow mime detection */ if (document) g_object_unref (document); -- cgit v0.9.1