From badc6c229f47964f5750a55a26204d847b33b32a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 9 Feb 2009 15:13:12 -0500 Subject: Create any missing directory necessary to put the wrapper file into. Closes: #514384 --- IkiWiki/Wrapper.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'IkiWiki/Wrapper.pm') 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 #include -- cgit v1.2.3