diff options
author | Carl Worth <cworth@cworth.org> | 2010-07-19 17:16:18 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-07-19 17:16:18 -0700 |
commit | 676d25111e1343ce31cb4a51b26f05a06305cda5 (patch) | |
tree | 1a9fff507d8ddc3160fe7b617778f333382e5259 /notmuch.c | |
parent | 6607fd65b1da6fbd9e617ff1b6d2a1a25c469333 (diff) |
Avoid segmentation fault with NOTMUCH_CONFIG=/new/config/file notmuch setup
Since commit f41a35e2923b0b3ef2f66e91cd30e20b4c1a336a running a command
such as:
NOTMUCH_CONFIG=/new/config/file notmuch setup
would result in a segmentation fault.
The purpose of that commit was to ensure that an attempt to manipulate
a non-standard database would not inadvertently manipulate the default
database only due to a typo in the NOTMUCH_CONFIG environment
variable. That is, a command like:
NOTMUCH_CONFIG=mistyped-config-filename notmuch tag -new tag:new
shouldn't modify the database at ${HOME}/mail, but should instead
simply report that the mistype configuration filename does not exist.
We fix both cases simultaneously by reporting the error message
whenever the function calling notmuch_config_open is not explicitly
prepared for a default configuration file.
Diffstat (limited to 'notmuch.c')
0 files changed, 0 insertions, 0 deletions