summaryrefslogtreecommitdiff
path: root/gio/glocalfileenumerator.c
diff options
context:
space:
mode:
Diffstat (limited to 'gio/glocalfileenumerator.c')
-rw-r--r--gio/glocalfileenumerator.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gio/glocalfileenumerator.c b/gio/glocalfileenumerator.c
index 21030bdc2..3694896a4 100644
--- a/gio/glocalfileenumerator.c
+++ b/gio/glocalfileenumerator.c
@@ -23,6 +23,7 @@
#include "config.h"
#include <glib.h>
+#include <gcancellable.h>
#include <glocalfileenumerator.h>
#include <glocalfileinfo.h>
#include <glocalfile.h>
@@ -383,6 +384,9 @@ g_local_file_enumerator_next_file (GFileEnumerator *enumerator,
next_file:
+ if (g_cancellable_set_error_if_cancelled (cancellable, error))
+ return NULL;
+
#ifdef USE_GDIR
filename = g_dir_read_name (local->dir);
file_type = G_FILE_TYPE_UNKNOWN;