From c90e5f89904aa749068c64992bddc7e759ba316b Mon Sep 17 00:00:00 2001 From: Calvin Walton Date: Fri, 30 Jan 2015 10:11:44 -0500 Subject: [PATCH] Skip the 'ser' repair if there are no webcam videos This was causing the sanity check to fail. --- record-and-playback/core/scripts/sanity/sanity.rb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/record-and-playback/core/scripts/sanity/sanity.rb b/record-and-playback/core/scripts/sanity/sanity.rb index d1d3cad948..433b7ab6e5 100755 --- a/record-and-playback/core/scripts/sanity/sanity.rb +++ b/record-and-playback/core/scripts/sanity/sanity.rb @@ -54,12 +54,14 @@ def check_webcam_files(raw_dir, meeting_id) BigBlueButton.logger.info("Repairing red5 serialized streams") cp="/usr/share/red5/red5-server.jar:/usr/share/red5/lib/*" - FileUtils.cd("#{meeting_dir}/video/#{meeting_id}") do - Dir.glob("*.flv.ser").each do |ser| - BigBlueButton.logger.info("Repairing #{ser}") - ret = BigBlueButton.exec_ret('java', '-cp', cp, 'org.red5.io.flv.impl.FLVWriter', ser, '0', '7') - if ret != 0 - BigBlueButton.logger.warn("Failed to repair #{ser}") + if File.directory?("#{meeting_dir}/video/#{meeting_id}") + FileUtils.cd("#{meeting_dir}/video/#{meeting_id}") do + Dir.glob("*.flv.ser").each do |ser| + BigBlueButton.logger.info("Repairing #{ser}") + ret = BigBlueButton.exec_ret('java', '-cp', cp, 'org.red5.io.flv.impl.FLVWriter', ser, '0', '7') + if ret != 0 + BigBlueButton.logger.warn("Failed to repair #{ser}") + end end end end