fix two pass files location
This commit is contained in:
parent
a3f4c077ef
commit
740b258ce1
2 changed files with 3 additions and 6 deletions
|
@ -200,7 +200,7 @@ app.whenReady().then(() => {
|
|||
deleteFile(file);
|
||||
|
||||
// Delete the 2 pass temporary files
|
||||
deleteTwoPassFiles(file);
|
||||
deleteTwoPassFiles(process.cwd());
|
||||
|
||||
return finalFile;
|
||||
};
|
||||
|
|
|
@ -47,11 +47,8 @@ export const deleteFile = (file: string) => {
|
|||
});
|
||||
};
|
||||
|
||||
/** Delete the 2pass files generated by ffmpeg, we're using
|
||||
* the file location to know in which directory they are.
|
||||
* We're checking first if they exists where we are looking at. */
|
||||
export const deleteTwoPassFiles = (file: string) => {
|
||||
const directory = path.parse(file).dir;
|
||||
/** Delete the 2pass files generated by ffmpeg */
|
||||
export const deleteTwoPassFiles = (directory: string) => {
|
||||
const logFile = path.join(directory, "ffmpeg2pass-0.log");
|
||||
|
||||
if (existsSync(logFile)) {
|
||||
|
|
Loading…
Reference in a new issue