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);
|
deleteFile(file);
|
||||||
|
|
||||||
// Delete the 2 pass temporary files
|
// Delete the 2 pass temporary files
|
||||||
deleteTwoPassFiles(file);
|
deleteTwoPassFiles(process.cwd());
|
||||||
|
|
||||||
return finalFile;
|
return finalFile;
|
||||||
};
|
};
|
||||||
|
|
|
@ -47,11 +47,8 @@ export const deleteFile = (file: string) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Delete the 2pass files generated by ffmpeg, we're using
|
/** Delete the 2pass files generated by ffmpeg */
|
||||||
* the file location to know in which directory they are.
|
export const deleteTwoPassFiles = (directory: string) => {
|
||||||
* We're checking first if they exists where we are looking at. */
|
|
||||||
export const deleteTwoPassFiles = (file: string) => {
|
|
||||||
const directory = path.parse(file).dir;
|
|
||||||
const logFile = path.join(directory, "ffmpeg2pass-0.log");
|
const logFile = path.join(directory, "ffmpeg2pass-0.log");
|
||||||
|
|
||||||
if (existsSync(logFile)) {
|
if (existsSync(logFile)) {
|
||||||
|
|
Loading…
Reference in a new issue