From e1f484d9b8881577d3888a9904d95549a2802191 Mon Sep 17 00:00:00 2001 From: Luca Date: Wed, 26 Aug 2020 21:52:12 +0200 Subject: [PATCH] Fix for missing storyboards in dev mode --- src/renderer/views/Watch/Watch.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/renderer/views/Watch/Watch.js b/src/renderer/views/Watch/Watch.js index 0ec03dc0..cd5bd6a0 100644 --- a/src/renderer/views/Watch/Watch.js +++ b/src/renderer/views/Watch/Watch.js @@ -653,11 +653,14 @@ export default Vue.extend({ if (this.isDev) { fileLocation = `storyboards/${this.videoId}.vtt` uriSchema = fileLocation + // if the location does not exist, writeFileSync will not create the directory, so we have to do that manually + if (!fs.existsSync('storyboards/')) { + fs.mkdirSync('storyboards/') + } } else { fileLocation = `${userData}/storyboards/${this.videoId}.vtt` uriSchema = `file://${fileLocation}` } - fs.writeFileSync(fileLocation, results) this.videoStoryboardSrc = uriSchema