From b0ef17828c41dd40652f566033bf9824eccdb636 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 8 Mar 2018 14:09:09 +0100 Subject: [PATCH] Do not destroy the video if transcoding fails --- server/models/video/video.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/models/video/video.ts b/server/models/video/video.ts index f6a21814c..1b9d68073 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -1138,10 +1138,10 @@ export class VideoModel extends Model { outputPath: videoOutputPath } - try { - // Could be very long! - await transcode(transcodeOptions) + // Could be very long! + await transcode(transcodeOptions) + try { await unlinkPromise(videoInputPath) // Important to do this before getVideoFilename() to take in account the new file extension -- 2.41.0