X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=muttlib.c;h=9c835d19b34c03573f021686a93356bc6854ce0d;hp=24f4ef3bf2e8d98292705c378a90477ce2ac7108;hb=c25bc063f35aaad6938c2022dae7a283346c2769;hpb=5e53f9e5f65aa5b3af6f5af9d868403536534afb diff --git a/muttlib.c b/muttlib.c index 24f4ef3..9c835d1 100644 --- a/muttlib.c +++ b/muttlib.c @@ -1158,15 +1158,9 @@ FILE *mutt_open_read (const char *path, pid_t * thepid) *thepid = mutt_create_filter (s, NULL, &f, NULL); mem_free (&s); } else { - struct stat st; - - if (stat (path, &st) < 0) - return (NULL); - if (S_ISDIR (st.st_mode)) { - errno = EINVAL; - return (NULL); - } f = fopen (path, "r"); + if (!f) + return NULL; *thepid = -1; }