mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-15 10:15:54 -07:00
Promisify copyFileSync
This commit is contained in:
parent
20a7e85ed7
commit
d77265fb6a
1 changed files with 2 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
import fs, { promises as fsp } from 'fs';
|
import { promises as fsp } from 'fs';
|
||||||
import {
|
import {
|
||||||
IpluginDetails,
|
IpluginDetails,
|
||||||
IpluginInputArgs,
|
IpluginInputArgs,
|
||||||
|
|
@ -60,7 +60,7 @@ const plugin = async (args:IpluginInputArgs):Promise<IpluginOutputArgs> => {
|
||||||
await fsp.unlink(newFile);
|
await fsp.unlink(newFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
fs.copyFileSync(oldFile, newFile);
|
await fsp.copyFile(oldFile, newFile);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
outputFileObj: { _id: newFile },
|
outputFileObj: { _id: newFile },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue