modify notmuch_setup_command to return 1 if config file write fails.

This fixes a small bug in notmuch_setup_command such that it returned
OK and output the setup message footer even if the config file write
step failed.
This commit is contained in:
Jameson Graef Rollins 2009-11-22 16:58:35 -05:00 committed by Carl Worth
parent 5c5727ab52
commit 34c840a23e

View file

@ -156,10 +156,11 @@ notmuch_setup_command (unused (void *ctx),
notmuch_config_set_database_path (config, absolute_path);
}
notmuch_config_save (config);
if (! notmuch_config_save (config)) {
if (is_new)
welcome_message_post_setup ();
return 0;
} else {
return 1;
}
}