[tracker/binary-log-2: 37/44] 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: 37/44] libtracker-db: Do not warn if journal does not exist
- Date: Mon, 11 Jan 2010 17:55:29 +0000 (UTC)
commit d163cd83bc42221c7f3c8ab2c33ad95cc8cf103b
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 9772243..9eef1be 100644
--- a/src/libtracker-db/tracker-db-journal.c
+++ b/src/libtracker-db/tracker-db-journal.c
@@ -563,9 +563,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]