From: Joey Hess Date: Mon, 14 Sep 2009 00:20:21 +0000 (-0400) Subject: avoid tempfile warning X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/commitdiff_plain/af26398c14fe9de4e884e03df7125642ac9cdd82 avoid tempfile warning Allow tempfile to open the file, so it doesn't warn about possible insecurity. This probably fixes a real, but unlikely security hole too. --- diff --git a/IkiWiki/Plugin/cvs.pm b/IkiWiki/Plugin/cvs.pm index 1a0bad75f..f6db8bc98 100644 --- a/IkiWiki/Plugin/cvs.pm +++ b/IkiWiki/Plugin/cvs.pm @@ -322,7 +322,7 @@ sub rcs_recentchanges($) { eval q{use File::ReadBackwards}; error($@) if $@; - my (undef, $tmpfile) = tempfile(OPEN=>0); + my ($tmphandle, $tmpfile) = tempfile(); system("env TZ=UTC cvsps -q --cvs-direct -z 30 -x >$tmpfile"); if ($? == -1) { error "couldn't run cvsps: $!\n";