From fcadcdee09e0e2704bc1daa07ea412403273c6e0 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Tue, 22 Dec 2015 10:25:49 -0800 Subject: [PATCH] Prevent space between command and comment from being included in the command --- cron/cron-lib.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cron/cron-lib.pl b/cron/cron-lib.pl index 654d01a5d..5ff7ff014 100755 --- a/cron/cron-lib.pl +++ b/cron/cron-lib.pl @@ -1471,7 +1471,7 @@ Given a cron job with a # comment after the command, sets the comment field sub convert_comment { local ($job) = @_; -if ($job->{'command'} =~ /^(.*)\s*#([^#]*)$/) { +if ($job->{'command'} =~ /^(.*\S)\s*#([^#]*)$/) { $job->{'command'} = $1; $job->{'comment'} = $2; return 1;