]> git.notmuchmail.org Git - notmuch/commitdiff
notmuch_database_open: Fix error message for file-not-found.
authorCarl Worth <cworth@cworth.org>
Tue, 20 Oct 2009 17:14:00 +0000 (10:14 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 20 Oct 2009 17:14:00 +0000 (10:14 -0700)
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.

database.cc

index 528ae1154b48d9b4428c214355700e96f5123564..a53651035d9febd791b56c5d2b631b9d4db96da7 100644 (file)
@@ -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;
     }