diff options
author | Zefram <zefram@fysh.org> | 2017-11-17 03:26:47 +0000 |
---|---|---|
committer | Zefram <zefram@fysh.org> | 2017-11-17 03:35:40 +0000 |
commit | a6c31837e629c46be2f7496149b36a4b79f93484 (patch) | |
tree | aed847581150f6f5744ed8866b56a942fdf05cf0 /pp_sys.c | |
parent | a9fdb5b7996c84e762ac02fcb9949dadc31c1bdc (diff) | |
download | perl-a6c31837e629c46be2f7496149b36a4b79f93484.tar.gz |
correctly error on -k "nonexistent" on Windows
The file test operators for Unix permission bits were returning a blanket
false result on systems where the bit being tested for doesn't exist.
That's a sensible way to treat a nonexistent bit when statting a file,
but the false result was being returned without checking that the argument
actually refers to a file. Remove the pre-stat checks for nonexistent
bits, so that we get the correct errors for non-files. We still get a
blanket false result for nonexistent bits on files.
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 18 |
1 files changed, 0 insertions, 18 deletions
@@ -3374,24 +3374,6 @@ PP(pp_ftrowned) } tryAMAGICftest_MG(opchar); - /* I believe that all these three are likely to be defined on most every - system these days. */ -#ifndef S_ISUID - if(PL_op->op_type == OP_FTSUID) { - FT_RETURNNO; - } -#endif -#ifndef S_ISGID - if(PL_op->op_type == OP_FTSGID) { - FT_RETURNNO; - } -#endif -#ifndef S_ISVTX - if(PL_op->op_type == OP_FTSVTX) { - FT_RETURNNO; - } -#endif - result = my_stat_flags(0); if (result < 0) FT_RETURNUNDEF; |