]> www.fi.muni.cz Git - evince.git/blobdiff - libdocument/ev-document-factory.c
Update FSF address everywhere.
[evince.git] / libdocument / ev-document-factory.c
index 3173d029f191352213cbc7d4dad0ea358675f2a3..0ace5ec8d286337df3b3d4cc5b320087b4b8f760 100644 (file)
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
  */
 
@@ -199,6 +199,8 @@ free_uncompressed_uri (gchar *uri_unc)
  * 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.
  */
@@ -235,7 +237,7 @@ ev_document_factory_get_document (const char *uri, GError **error)
                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 */
@@ -283,7 +285,7 @@ ev_document_factory_get_document (const char *uri, GError **error)
                                              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;
                }