summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/bzr.pm4
-rw-r--r--IkiWiki/Plugin/mercurial.pm10
2 files changed, 5 insertions, 9 deletions
diff --git a/IkiWiki/Plugin/bzr.pm b/IkiWiki/Plugin/bzr.pm
index e7c1b8d8e..9bee0c4b2 100644
--- a/IkiWiki/Plugin/bzr.pm
+++ b/IkiWiki/Plugin/bzr.pm
@@ -287,9 +287,7 @@ sub rcs_diff ($) {
}
sub extract_timestamp (@) {
- # XXX filename passes through the shell here, should try to avoid
- # that just in case
- open (my $out, "@_ |");
+ open (my $out, "-|", @_);
my @log = bzr_log($out);
if (length @log < 1) {
diff --git a/IkiWiki/Plugin/mercurial.pm b/IkiWiki/Plugin/mercurial.pm
index 34e009c7a..a80bb2da5 100644
--- a/IkiWiki/Plugin/mercurial.pm
+++ b/IkiWiki/Plugin/mercurial.pm
@@ -236,15 +236,13 @@ sub rcs_diff ($) {
sub rcs_getctime ($) {
my ($file) = @_;
- # XXX filename passes through the shell here, should try to avoid
- # that just in case
my @cmdline = ("hg", "-R", $config{srcdir}, "log", "-v",
- "--style", "default", "$config{srcdir}/$file");
- open (my $out, "@cmdline |");
+ "--style", "default", $file);
+ open (my $out, "-|", @cmdline);
- my @log = mercurial_log($out);
+ my @log = (mercurial_log($out));
- if (length @log < 1) {
+ if (@log < 1) {
return 0;
}