From: Jarkko Hietaniemi <jhi@iki.fi>
Date: Tue, 8 Aug 2000 19:34:28 +0000 (+0000)
Subject: Double check that we have a dirhandle.
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3e11456d40b4ad69655e467967b6b2a956c124ab;p=p5sagit%2Fp5-mst-13.2.git

Double check that we have a dirhandle.

p4raw-id: //depot/perl@6557
---

diff --git a/util.c b/util.c
index b2fc797..3374c0c 100644
--- a/util.c
+++ b/util.c
@@ -3919,7 +3919,7 @@ Perl_report_evil_fh(pTHX_ GV *gv, IO *io, I32 op)
     if (name && *name) {
 	Perl_warner(aTHX_ warn,
 		    "%s%s on %s %s %s", func, pars, vile, type, name);
-	if (io && IoDIRP(io))
+	if (io && IoDIRP(io) && !(IoFLAGS(io) & IOf_FAKE_DIRP))
 	    Perl_warner(aTHX_ warn,
 			"\t(Are you trying to call %s%s on dirhandle %s?)\n",
 			func, pars, name);
@@ -3927,7 +3927,7 @@ Perl_report_evil_fh(pTHX_ GV *gv, IO *io, I32 op)
     else {
 	Perl_warner(aTHX_ warn,
 		    "%s%s on %s %s", func, pars, vile, type);
-	if (io && IoDIRP(io))
+	if (io && IoDIRP(io) && !(IoFLAGS(io) & IOf_FAKE_DIRP))
 	    Perl_warner(aTHX_ warn,
 			"\t(Are you trying to call %s%s on dirhandle?)\n",
 			func, pars);