From: Carl Worth Date: Tue, 20 Oct 2009 17:14:00 +0000 (-0700) Subject: notmuch_database_open: Fix error message for file-not-found. X-Git-Tag: 0.1~817 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=968feafbad724da29c7fb5d48f6d363150e48caf;p=notmuch.git notmuch_database_open: Fix error message for file-not-found. I was incorrectly using the return value of stat (-1) instead of errno (ENOENT) to try to construct the error message here. Also, while we're here, reword the error message to not have "stat" in it, which in spite of what a Unix programmer will tell you, is not actually a word. --- diff --git a/database.cc b/database.cc index 528ae115..a5365103 100644 --- a/database.cc +++ b/database.cc @@ -450,8 +450,8 @@ notmuch_database_open (const char *path) err = stat (notmuch_path, &st); if (err) { - fprintf (stderr, "Error: Cannot stat %s: %s\n", - notmuch_path, strerror (err)); + fprintf (stderr, "Error opening database at %s: %s\n", + notmuch_path, strerror (errno)); goto DONE; }