Fix thumbnailing cancellation

Everything's according to GAsyncResult documentation.
This commit is contained in:
Přemysl Eric Janouch 2021-12-28 23:47:36 +01:00
parent 98bdab443a
commit c49e58a0ba
Signed by: p
GPG Key ID: A0420B94F92B9493

View File

@ -465,6 +465,11 @@ on_thumbnailer_ready(GObject *object, GAsyncResult *res, gpointer user_data)
FivBrowser *self = FIV_BROWSER(user_data);
GError *error = NULL;
if (!g_subprocess_wait_check_finish(subprocess, res, &error)) {
if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
g_error_free(error);
return;
}
g_warning("%s", error->message);
g_error_free(error);
}