Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Try to make temp file safer
  • Loading branch information
moritz committed Feb 14, 2015
1 parent 6f6938b commit 0edfb1a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion htmlify.p6
Expand Up @@ -712,8 +712,10 @@ sub pygmentize-code-blocks {
return default($node);
}
}
my $tmp_fname = "$*TMPDIR/pod_to_pyg.pod";
my $basename = join '-', %*ENV<USER> // 'u', (^100_000).pick, 'pod_to_pyg.pod';
my $tmp_fname = "$*TMPDIR/$basename";
spurt $tmp_fname, $node.contents.join;
LEAVE try unlink $tmp_fname;
my $command = "pygmentize -l perl6 -f html < $tmp_fname";
return qqx{$command};
}
Expand Down

0 comments on commit 0edfb1a

Please sign in to comment.