From 441c5a1b9bc247ac25e553249412c4e2e977ad80 Mon Sep 17 00:00:00 2001 From: djcb Date: Sun, 19 Aug 2012 09:54:51 +0300 Subject: [PATCH] * mu-store-read: fix realpath checking --- lib/mu-store-read.cc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/mu-store-read.cc b/lib/mu-store-read.cc index e3321afc..b1f0d8d2 100644 --- a/lib/mu-store-read.cc +++ b/lib/mu-store-read.cc @@ -61,11 +61,10 @@ _MuStore::get_uid_term (const char* path) * realpath here (and in mu-msg-file) to ensure that the same * messages are only considered ones (ignore e.g. symlinks and * '//' in paths) */ - if (!realpath (path, real_path)) { - g_warning ("realpath() failed for %s: %s", - path, strerror (errno)); - strcpy (real_path, path); /* ignore errors */ - } + + // note: realpath fails when there's no file at path + if (!realpath (path, real_path)) + strcpy (real_path, path); djbhash = 5381; bkdrhash = 0; @@ -140,9 +139,6 @@ mu_store_needs_upgrade (MuStore *store) { g_return_val_if_fail (store, TRUE); - // g_print ("'%s' <=> '%s'\n", mu_store_version (store), - // MU_STORE_SCHEMA_VERSION); - return (g_strcmp0 (mu_store_version (store), MU_STORE_SCHEMA_VERSION) == 0) ? FALSE : TRUE; }