[tracker/binary-log-2: 30/38] libtracker-db: Do not warn if journal does not exist
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker/binary-log-2: 30/38] libtracker-db: Do not warn if journal does not exist
- Date: Tue, 12 Jan 2010 14:36:54 +0000 (UTC)
commit 22f8ae2517703e4d30d7cd8f5569f4b72ccdce2a
Author: Jürg Billeter <j bitron ch>
Date: Thu Jan 7 16:09:09 2010 +0100
libtracker-db: Do not warn if journal does not exist
src/libtracker-db/tracker-db-journal.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/libtracker-db/tracker-db-journal.c b/src/libtracker-db/tracker-db-journal.c
index b009f98..1d1af7b 100644
--- a/src/libtracker-db/tracker-db-journal.c
+++ b/src/libtracker-db/tracker-db-journal.c
@@ -564,9 +564,12 @@ tracker_db_journal_reader_init (const gchar *filename)
reader.file = g_mapped_file_new (reader.filename, FALSE, &error);
if (error) {
- g_warning ("Could not create TrackerDBJournalReader for file '%s', %s",
- reader.filename,
- error->message ? error->message : "no error given");
+ if (!g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT)) {
+ /* do not warn if the file does not exist, just return FALSE */
+ g_warning ("Could not create TrackerDBJournalReader for file '%s', %s",
+ reader.filename,
+ error->message ? error->message : "no error given");
+ }
g_error_free (error);
g_free (reader.filename);
reader.filename = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]