[tracker-miners/wip/carlosg/miner-fs-ancillary-files: 2/10] libtracker-miner: Proceed as expected on TrackerCrawler returning FALSE
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/miner-fs-ancillary-files: 2/10] libtracker-miner: Proceed as expected on TrackerCrawler returning FALSE
- Date: Sun, 15 Nov 2020 10:56:23 +0000 (UTC)
commit 5f08fdc115698193a607fce291259da8c0bf03bd
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Nov 8 18:00:38 2020 +0100
libtracker-miner: Proceed as expected on TrackerCrawler returning FALSE
Not all error conditions mean that crawling was interrupted, check explicitly
that the operation was cancelled, And proceed regularly with the others.
src/libtracker-miner/tracker-file-notifier.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index 7317ed93e..56116fb1a 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -482,8 +482,11 @@ crawler_get_cb (TrackerCrawler *crawler,
&files_found,
&files_ignored,
&error)) {
+ gboolean interrupted;
+
if (error &&
- !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
+ !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED) &&
+ !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) {
gchar *uri;
uri = g_file_get_uri (directory);
@@ -491,8 +494,12 @@ crawler_get_cb (TrackerCrawler *crawler,
uri, error->message);
g_free (uri);
}
+
+ interrupted = error &&
+ g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED);
+
tracker_monitor_remove (priv->monitor, directory);
- finish_current_directory (notifier, TRUE);
+ finish_current_directory (notifier, interrupted);
g_clear_error (&error);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]