diff options
-rw-r--r-- | perlio.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -4971,6 +4971,12 @@ PerlIO_tmpfile(void) /* else we try /tmp */ fd = mkstemp(tempname); } + if (fd < 0) { + /* Try cwd */ + sv = newSVpvs("."); + sv_catpv(sv, tempname + 4); + fd = mkstemp(SvPVX(sv)); + } if (fd >= 0) { f = PerlIO_fdopen(fd, "w+"); if (f) |