All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 749a51b9 authored by Leigh B Stoller's avatar Leigh B Stoller

Minor addition for escaping shell arguments.

parent 3c5e82d6
......@@ -1151,5 +1151,20 @@ sub ClearNoDelete($)
return ($? ? -1 : 0);
}
sub escapeshellarg($)
{
my ($str) = @_;
my @chars = split('', $str);
my $result = "";
foreach my $ch (@chars) {
if ($ch eq '\'') {
$result = $result . "\'\\\'";
}
$result = $result . "$ch";
}
return "'$result'";
}
# _Always_ make sure that this 1 is at the end of the file...
1;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment