+2009-03-03 Christian Persch <chpe@gnome.org>
+
+ * libdocument/ev-document-factory.c:
+ (ev_document_factory_get_document): If the document is encrypted,
+ the ev_document_factory_get_document() is supposed to return the
+ document *and* fill in the error. So let's propagate the local error.
+
2009-03-02 Carlos Garcia Campos <carlosgc@gnome.org>
* NEWS:
* Creates a #EvDocument for the document at @uri; or, if no backend handling
* the document's type is found, or an error occurred on opening the document,
* returns %NULL and fills in @error.
+ * If the document is encrypted, it is returned but also @error is set to
+ * %EV_DOCUMENT_ERROR_ENCRYPTED.
*
* Returns: a new #EvDocument, or %NULL.
*/
if (result == FALSE || err) {
if (err &&
g_error_matches (err, EV_DOCUMENT_ERROR, EV_DOCUMENT_ERROR_ENCRYPTED)) {
- g_error_free (err);
+ g_propagate_error (error, err);
return document;
}
/* else fall through to slow mime code section below */
EV_DOCUMENT_ERROR_INVALID,
_("Unknown MIME Type"));
} else if (g_error_matches (err, EV_DOCUMENT_ERROR, EV_DOCUMENT_ERROR_ENCRYPTED)) {
- g_error_free (err);
+ g_propagate_error (error, err);
return document;
}