#3268: mutt: does not report errors properly ------------------------------+--------------------------------------------- Reporter: [email protected] | Owner: mutt-dev Type: defect | Status: new Priority: trivial | Milestone: Component: mutt | Version: 1.5.20 Keywords: | ------------------------------+--------------------------------------------- Forwarding from http://bugs.debian.org/533209 {{{ $ cat /dev/core cat: /dev/core: Permission denied
$ mutt -f /dev/core /dev/core: Success (errno = 0) }}} I had a look a the code, it seems that the bug is coming from mx.c, mutt_perror is being called twice, one inside mx_get_magic (mx.c:367) and another one inside mx_open_mailbox (mx.c:625), just after the mx_get_magic() call. The second call happens when errno is already clear, so it will overwrite the output of the first call in the terminal. Since mx_get_magic() is never calling mutt_perror() for any of its errors, leaving the responsibility to do so to the caller mx_open_mailbox) I reckon it was fine to remove mutt_perror from mx_get_magic(). The attached patch fixes the problem. -- Ticket URL: <http://dev.mutt.org/trac/ticket/3268> Mutt <http://www.mutt.org/> The Mutt mail user agent
