From d77265fb6a23f3f48b7718bb79f9ab47a2e9f6ba Mon Sep 17 00:00:00 2001 From: HaveAGitGat <43864057+HaveAGitGat@users.noreply.github.com> Date: Sat, 1 Jun 2024 08:35:07 +0100 Subject: [PATCH] Promisify copyFileSync --- .../CommunityFlowPlugins/video/transcodeVideo/1.0.0/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FlowPluginsTs/CommunityFlowPlugins/video/transcodeVideo/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/video/transcodeVideo/1.0.0/index.ts index cc9f730..643f881 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/video/transcodeVideo/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/video/transcodeVideo/1.0.0/index.ts @@ -1,4 +1,4 @@ -import fs, { promises as fsp } from 'fs'; +import { promises as fsp } from 'fs'; import { IpluginDetails, IpluginInputArgs, @@ -60,7 +60,7 @@ const plugin = async (args:IpluginInputArgs):Promise => { await fsp.unlink(newFile); } - fs.copyFileSync(oldFile, newFile); + await fsp.copyFile(oldFile, newFile); return { outputFileObj: { _id: newFile },