From eb95e9a718bc0393a154195e22c5d370fe9bff70 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 2 Jul 2013 08:52:47 +0200 Subject: [PATCH] Make sure the CGIs don't croak on our objects.cache file. --- components/compat/compatcomponent.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/compat/compatcomponent.cpp b/components/compat/compatcomponent.cpp index 0a6687c66..ba108d589 100644 --- a/components/compat/compatcomponent.cpp +++ b/components/compat/compatcomponent.cpp @@ -232,7 +232,8 @@ void CompatComponent::DumpComments(std::ostream& fp, const Service::Ptr& owner, void CompatComponent::DumpTimePeriod(std::ostream& fp, const TimePeriod::Ptr& tp) { fp << "define timeperiod {" << "\n" - << "\t" << "timeperiod_name" << "\t" << tp->GetName() << "\n"; + << "\t" << "timeperiod_name" << "\t" << tp->GetName() << "\n" + << "\t" << "alias" << "\t" << tp->GetName() << "\n"; Dictionary::Ptr ranges = tp->Get("ranges"); @@ -267,8 +268,10 @@ void CompatComponent::DumpCommand(std::ostream& fp, const Command::Ptr& command) // This is obviously incorrect for non-trivial cases. fp << " \"" << arg << "\""; } + } else if (!commandLine.IsEmpty()) { + fp << Convert::ToString(commandLine); } else { - fp << Convert::ToString(commandLine) << "\n"; + fp << ""; } fp << "\n"; -- 2.40.0