aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Wrapper.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-02-09 15:13:12 -0500
committerJoey Hess <joey@gnu.kitenet.net>2009-02-09 15:13:12 -0500
commitbadc6c229f47964f5750a55a26204d847b33b32a (patch)
tree7ec460e1f0cc19de2eb44b7ebab6a4f54f8b2154 /IkiWiki/Wrapper.pm
parent6605764c523787141272fe83c3d46a65aea7649d (diff)
downloadikiwiki-badc6c229f47964f5750a55a26204d847b33b32a.tar
ikiwiki-badc6c229f47964f5750a55a26204d847b33b32a.tar.gz
Create any missing directory necessary to put the wrapper file into. Closes: #514384
Diffstat (limited to 'IkiWiki/Wrapper.pm')
-rw-r--r--IkiWiki/Wrapper.pm5
1 files changed, 1 insertions, 4 deletions
diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm
index 7b54caf99..6555fe625 100644
--- a/IkiWiki/Wrapper.pm
+++ b/IkiWiki/Wrapper.pm
@@ -93,10 +93,7 @@ EOF
$configstring=~s/"/\\"/g;
$configstring=~s/\n/\\n/g;
- #translators: The first parameter is a filename, and the second is
- #translators: a (probably not translated) error message.
- open(OUT, ">$wrapper.c") || error(sprintf(gettext("failed to write %s: %s"), "$wrapper.c", $!));
- print OUT <<"EOF";
+ writefile(basename("$wrapper.c"), dirname($wrapper), <<"EOF");
/* A wrapper for ikiwiki, can be safely made suid. */
#include <stdio.h>
#include <sys/types.h>