diff options
author | Hugo van der Sanden <hv@crypt.org> | 2015-02-13 12:26:50 +0000 |
---|---|---|
committer | Hugo van der Sanden <hv@crypt.org> | 2015-02-16 03:14:06 +0000 |
commit | 87ebf1e3df9537a204b21f0405c6e60f2acdcc47 (patch) | |
tree | 3917d6e76e3eb769a80087f9f38e5e3af0f0935c /op.c | |
parent | e47d32dcd59a578274f445fac79e977d83055c8c (diff) | |
download | perl-87ebf1e3df9537a204b21f0405c6e60f2acdcc47.tar.gz |
[perl #123816] fix stat stacking
The check function for filetests avoids treating '-t stat' as a pair of
stackable filetests, but needs also to avoid treating 'stat -t' as
stackable.
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -9876,8 +9876,10 @@ Perl_ck_ftst(pTHX_ OP *o) } if ((PL_hints & HINT_FILETEST_ACCESS) && OP_IS_FILETEST_ACCESS(o->op_type)) o->op_private |= OPpFT_ACCESS; - if (PL_check[kidtype] == Perl_ck_ftst - && kidtype != OP_STAT && kidtype != OP_LSTAT) { + if (type != OP_STAT && type != OP_LSTAT + && PL_check[kidtype] == Perl_ck_ftst + && kidtype != OP_STAT && kidtype != OP_LSTAT + ) { o->op_private |= OPpFT_STACKED; kid->op_private |= OPpFT_STACKING; if (kidtype == OP_FTTTY && ( |