diff options
author | Gaël Bonithon <gael@xfce.org> | 2021-12-20 18:24:28 +0100 |
---|---|---|
committer | Gaël Bonithon <gael@xfce.org> | 2021-12-20 18:28:59 +0100 |
commit | ad432ab47e1ede51bee08af11daca69a9ca6a216 (patch) | |
tree | 3f444ce5925150f6df48f0d153bd345fb1b48eba /plugins/poppler-thumbnailer | |
parent | fe51cbf69d297fd391d7361877529b17118875b2 (diff) | |
download | tumbler-ad432ab47e1ede51bee08af11daca69a9ca6a216.tar.gz |
poppler-thumbnailer: Fix error handling
Diffstat (limited to 'plugins/poppler-thumbnailer')
-rw-r--r-- | plugins/poppler-thumbnailer/poppler-thumbnailer.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/poppler-thumbnailer/poppler-thumbnailer.c b/plugins/poppler-thumbnailer/poppler-thumbnailer.c index 036eb53..6fa1c1a 100644 --- a/plugins/poppler-thumbnailer/poppler-thumbnailer.c +++ b/plugins/poppler-thumbnailer/poppler-thumbnailer.c @@ -300,8 +300,7 @@ poppler_thumbnailer_create (TumblerAbstractThumbnailer *thumbnailer, /* try to load the file contents using GIO */ if (!g_file_load_contents (file, cancellable, &contents, &length, NULL, &error)) { - g_signal_emit_by_name (thumbnailer, "error", uri, TUMBLER_ERROR_UNSUPPORTED, - error->message); + g_signal_emit_by_name (thumbnailer, "error", uri, error->code, error->message); g_error_free (error); g_object_unref (file); return; @@ -323,8 +322,7 @@ poppler_thumbnailer_create (TumblerAbstractThumbnailer *thumbnailer, /* emit an error if both ways to load the document failed */ if (document == NULL) { - g_signal_emit_by_name (thumbnailer, "error", uri, TUMBLER_ERROR_INVALID_FORMAT, - error->message); + g_signal_emit_by_name (thumbnailer, "error", uri, error->code, error->message); g_error_free (error); poppler_thumbnailer_free (contents); return; |