Double check that we have a dirhandle.
authorJarkko Hietaniemi <jhi@iki.fi>
Tue, 8 Aug 2000 19:34:28 +0000 (19:34 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 8 Aug 2000 19:34:28 +0000 (19:34 +0000)
p4raw-id: //depot/perl@6557

util.c

diff --git a/util.c b/util.c
index b2fc797..3374c0c 100644 (file)
--- 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);