aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-12-03 10:10:14 +0100
committerChocobozzz <me@florianbigard.com>2019-12-03 10:10:14 +0100
commit3f6b7aa1cfa28ee02eec8c8ab16b623f2bbab928 (patch)
tree9c0c0c5271ad25b943bfbefe83cb9ab8227e23f5 /server/helpers
parent63472d88d1a319405752873dfc8d809d28cde583 (diff)
downloadPeerTube-3f6b7aa1cfa28ee02eec8c8ab16b623f2bbab928.tar.gz
PeerTube-3f6b7aa1cfa28ee02eec8c8ab16b623f2bbab928.tar.zst
PeerTube-3f6b7aa1cfa28ee02eec8c8ab16b623f2bbab928.zip
Don't move the caption if it has the right name
Diffstat (limited to 'server/helpers')
-rw-r--r--server/helpers/captions-utils.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/helpers/captions-utils.ts b/server/helpers/captions-utils.ts
index 2830ae017..73b6d166d 100644
--- a/server/helpers/captions-utils.ts
+++ b/server/helpers/captions-utils.ts
@@ -12,7 +12,7 @@ async function moveAndProcessCaptionFile (physicalFile: { filename: string, path
12 if (physicalFile.path.endsWith('.srt')) { 12 if (physicalFile.path.endsWith('.srt')) {
13 await convertSrtToVtt(physicalFile.path, destination) 13 await convertSrtToVtt(physicalFile.path, destination)
14 await remove(physicalFile.path) 14 await remove(physicalFile.path)
15 } else { // Just move the vtt file 15 } else if (physicalFile.path !== destination) { // Just move the vtt file
16 await move(physicalFile.path, destination, { overwrite: true }) 16 await move(physicalFile.path, destination, { overwrite: true })
17 } 17 }
18 18