]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Wrapper.pm
goto: Fix redirect to comments.
[ikiwiki.git] / IkiWiki / Wrapper.pm
index 8a6340f58c4f1ec5a6b77587672e0721f0f250c7..6555fe625f8e542e786f3b6d7d05a72772ea207f 100644 (file)
@@ -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>