From 7d643f9bf895f251490d9416af02b8e14c714e1c Mon Sep 17 00:00:00 2001 From: Calvin Walton <calvin.walton@kepstin.ca> Date: Wed, 23 May 2018 12:03:20 -0400 Subject: [PATCH] RaP sanity: Don't delete .ser file unless repair succeeded --- record-and-playback/core/scripts/sanity/sanity.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/record-and-playback/core/scripts/sanity/sanity.rb b/record-and-playback/core/scripts/sanity/sanity.rb index 813c336b56..7adef5f6e2 100755 --- a/record-and-playback/core/scripts/sanity/sanity.rb +++ b/record-and-playback/core/scripts/sanity/sanity.rb @@ -66,13 +66,12 @@ def repair_red5_ser(directory) 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}") + next end - end - BigBlueButton.logger.info("Cleaning up red5 .flv.ser and .flv.info files") - Dir.glob("*.flv.{ser,info}").each do |f| - BigBlueButton.logger.info("Removing #{f}") - FileUtils.rm(f) + BigBlueButton.logger.info("Cleaning up .flv.ser and .flv.info files") + FileUtils.rm_f(ser) + FileUtils.rm_f("#{ser[0..-5]}.info") end end end -- GitLab