mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
gpgconf: No ENOENT warning with --change-options et al.
* tools/gpgconf-comp.c (retrieve_options_from_program): Check ERRNO before printing a warning. -- It is common that a conf files does not exist - thus we should not print a warning. GnuPG-bug-id: 2944 BTW: The error messages in gpgconf should be reworked to match those of the other components. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
810adfd478
commit
30dac0486b
@ -2164,8 +2164,11 @@ retrieve_options_from_program (gc_component_t component, gc_backend_t backend)
|
||||
|
||||
config = es_fopen (config_filename, "r");
|
||||
if (!config)
|
||||
gc_error (0, errno, "warning: can not open config file %s",
|
||||
config_filename);
|
||||
{
|
||||
if (errno != ENOENT)
|
||||
gc_error (0, errno, "warning: can not open config file %s",
|
||||
config_filename);
|
||||
}
|
||||
else
|
||||
{
|
||||
while ((length = es_read_line (config, &line, &line_len, NULL)) > 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user