Skip to content

Commit

Permalink
[libview] Fix loading of compressed password-protected documents
Browse files Browse the repository at this point in the history
Fixes bug #613959.
  • Loading branch information
Carlos Garcia Campos committed Apr 3, 2010
1 parent 0f458d8 commit 0acd3c3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libview/ev-jobs.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,8 @@ ev_job_load_run (EvJob *job)
because, e.g., a password is required - if so, just reload rather than
creating a new instance */
if (job->document) {
const gchar *uncompressed_uri;

if (job_load->password) {
ev_document_security_set_password (EV_DOCUMENT_SECURITY (job->document),
job_load->password);
Expand All @@ -848,9 +850,11 @@ ev_job_load_run (EvJob *job)
job->failed = FALSE;
job->finished = FALSE;
g_clear_error (&job->error);


uncompressed_uri = g_object_get_data (G_OBJECT (job->document),
"uri-uncompressed");
ev_document_load (job->document,
job_load->uri,
uncompressed_uri ? uncompressed_uri : job_load->uri,
&error);
} else {
job->document = ev_document_factory_get_document (job_load->uri,
Expand Down

0 comments on commit 0acd3c3

Please sign in to comment.