[tracker-miners/wip/carlosg/extraction-fixes: 3/8] tracker: Ignore ENOENT trying to reset miner data
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/extraction-fixes: 3/8] tracker: Ignore ENOENT trying to reset miner data
- Date: Wed, 30 Sep 2020 16:14:44 +0000 (UTC)
commit ca071d2d936920cdd035808ea3286fa70d621d98
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Sep 25 12:34:43 2020 +0200
tracker: Ignore ENOENT trying to reset miner data
If one tries to "tracker3 reset -s" multiple times, the second time
(tracker reset:56140): Tracker-CRITICAL **: 12:35:42.437: Location does not have a Tracker DB: Error
opening directory '/home/carlos/.cache/tracker3/files/errors': No such file or directory
will happen. Try to avoid this silly situation.
src/tracker/tracker-reset.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/tracker/tracker-reset.c b/src/tracker/tracker-reset.c
index 368ed2a0b..3080d93e7 100644
--- a/src/tracker/tracker-reset.c
+++ b/src/tracker/tracker-reset.c
@@ -143,8 +143,11 @@ delete_location_content (GFile *dir)
G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
NULL, &error);
if (error) {
- g_critical ("Location does not have a Tracker DB: %s",
- error->message);
+ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) {
+ g_critical ("Location does not have a Tracker DB: %s",
+ error->message);
+ }
+
g_error_free (error);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]