]> www.fi.muni.cz Git - evince.git/commitdiff
Load document even if extension is wrong.
authorNickolay V. Shmyrev <nshmyrev@yandex.ru>
Sun, 8 Oct 2006 07:29:56 +0000 (07:29 +0000)
committerNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Sun, 8 Oct 2006 07:29:56 +0000 (07:29 +0000)
2006-10-08  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>

* backend/ev-document-factory.c:
(ev_document_factory_get_document):

Load document even if extension is wrong.

ChangeLog
backend/ev-document-factory.c

index aed16a1dd11013ae44d85c42a3b36c9dd6b7c021..c89a93a931c3fb674a01defd18e7fd36e55ae09f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-10-08  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
+
+       * backend/ev-document-factory.c:
+       (ev_document_factory_get_document):
+       
+       Load document even if extension is wrong.
+
 2006-10-03  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
 
        * shell/ev-metadata-manager.c: (save_values):
index 3b3f701a5ce6edf54aa5f7100ab9f833e1705614..a2ea5263f49ec055768d7bc9cd3c2cf4be0ba900 100644 (file)
@@ -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);