drop the dead code and close the gaps in the verification gate
This commit is contained in:
@@ -875,14 +875,14 @@ fn stop_capture(state: State<'_, AppState>) -> Result<RecordedClip, String> {
|
||||
for ap in &ss.audio_segments {
|
||||
drop(std::fs::remove_file(ap));
|
||||
}
|
||||
} else if video_concat != final_path {
|
||||
} else {
|
||||
// No audio to mux. `video_concat` is either the one segment or the
|
||||
// concat output, and `final_path` is always recording.mp4, so it always
|
||||
// needs moving into place.
|
||||
std::fs::rename(&video_concat, &final_path)
|
||||
.or_else(|_| std::fs::copy(&video_concat, &final_path).map(|_| ()))
|
||||
.map_err(|e| format!("finalizing: {e:#}"))?;
|
||||
drop(std::fs::remove_file(&video_concat));
|
||||
} else {
|
||||
// No audio and a single segment: the concat output already sits at
|
||||
// final_path, so there is nothing left to move.
|
||||
}
|
||||
|
||||
let clip = RecordedClip {
|
||||
|
||||
Reference in New Issue
Block a user