[libgsystem] fileutils: Handle cancellable in tmpfile code
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgsystem] fileutils: Handle cancellable in tmpfile code
- Date: Sat, 5 Jan 2013 00:38:35 +0000 (UTC)
commit a2519612547354033f0d513a174f336896776fa8
Author: Colin Walters <walters verbum org>
Date: Fri Jan 4 19:38:00 2013 -0500
fileutils: Handle cancellable in tmpfile code
Just noticed with self-code review.
gsystem-file-utils.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gsystem-file-utils.c b/gsystem-file-utils.c
index 2fafbf4..312ea2f 100644
--- a/gsystem-file-utils.c
+++ b/gsystem-file-utils.c
@@ -310,6 +310,9 @@ gs_file_linkcopy_sync_data (GFile *src,
gs_free char *tmp_name = NULL;
gs_unref_object GFile *tmp_dest = NULL;
+ if (g_cancellable_set_error_if_cancelled (cancellable, error))
+ goto out;
+
tmp_name = gen_tmp_name (NULL, NULL);
tmp_dest = g_file_get_child (dest_parent, tmp_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]