mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
pacman: be more descriptive when opening an include fails
if fopen returns NULL, append the libc strerror-ized error message to our own error message. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
e0daaea38c
commit
392fffe241
@ -720,7 +720,8 @@ static int _parseconfig(const char *file, struct section_t *section,
|
||||
pm_printf(ALPM_LOG_DEBUG, "config: attempting to read file %s\n", file);
|
||||
fp = fopen(file, "r");
|
||||
if(fp == NULL) {
|
||||
pm_printf(ALPM_LOG_ERROR, _("config file %s could not be read.\n"), file);
|
||||
pm_printf(ALPM_LOG_ERROR, _("config file %s could not be read: %s\n"),
|
||||
file, strerror(errno));
|
||||
ret = 1;
|
||||
goto cleanup;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user