1 2006-10-21 David Kimdon <dwhedon@gordian.com>
3 * opncls.c (bfd_fopen): Return failure if filename is a directory.
7 @@ -182,6 +182,15 @@ bfd_fopen (const char *filename, const c
10 const bfd_target *target_vec;
13 + if ((fd != -1 && fstat (fd, &s) == 0) ||
14 + (fd == -1 && stat (filename, &s) == 0))
15 + if (S_ISDIR(s.st_mode))
17 + bfd_set_error (bfd_error_file_not_recognized);
21 nbfd = _bfd_new_bfd ();