From f4e64e2f675057d23a94277fa103479549f862bc Mon Sep 17 00:00:00 2001 From: infirit Date: Fri, 21 Nov 2014 15:43:10 +0100 Subject: added a cancellable object to some GIO functions Based on FR commit: a323c11554785a9861fff4ae919e91c076babd82 From: Paolo Bacchilega --- src/fr-archive.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/fr-archive.c') diff --git a/src/fr-archive.c b/src/fr-archive.c index 598d769..abe5dc3 100644 --- a/src/fr-archive.c +++ b/src/fr-archive.c @@ -1147,7 +1147,7 @@ load_local_archive (FrArchive *archive, FrCommand *tmp_command; const char *mime_type; - if (! g_file_query_exists (archive->file, NULL)) { + if (! g_file_query_exists (archive->file, archive->priv->cancellable)) { fr_archive_action_completed (archive, FR_ACTION_LOADING_ARCHIVE, FR_PROC_ERROR_GENERIC, @@ -1254,11 +1254,13 @@ copy_remote_file (FrArchive *archive, { XferData *xfer_data; - if (! g_file_query_exists (archive->file, NULL)) { + if (! g_file_query_exists (archive->file, archive->priv->cancellable)) { GError *error; + error = g_error_new (G_IO_ERROR, G_IO_ERROR_NOT_FOUND, _("Archive not found")); fr_archive_copy_done (archive, FR_ACTION_LOADING_ARCHIVE, error); g_error_free (error); + return; } -- cgit v1.2.1