Squash errors in case of mkdir trying to create an existing directory (need mkdirp, but this works without an extra module)
This commit is contained in:
parent
8c97258866
commit
0c364576c9
|
@ -201,8 +201,13 @@ class FFMPEG {
|
||||||
await fs_extra_1.mkdir(tmppath);
|
await fs_extra_1.mkdir(tmppath);
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
|
if (err.code && err.code === 'EEXIST') {
|
||||||
|
//directory exists
|
||||||
|
}
|
||||||
|
else {
|
||||||
this.log.error(err);
|
this.log.error(err);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//ffmpeg -i "${video}" -compression_algo raw -pix_fmt rgb24 "${tmpoutput}"
|
//ffmpeg -i "${video}" -compression_algo raw -pix_fmt rgb24 "${tmpoutput}"
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
let stdout = '';
|
let stdout = '';
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -201,8 +201,13 @@ class FFMPEG {
|
||||||
await fs_extra_1.mkdir(tmppath);
|
await fs_extra_1.mkdir(tmppath);
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
|
if (err.code && err.code === 'EEXIST') {
|
||||||
|
//directory exists
|
||||||
|
}
|
||||||
|
else {
|
||||||
this.log.error(err);
|
this.log.error(err);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//ffmpeg -i "${video}" -compression_algo raw -pix_fmt rgb24 "${tmpoutput}"
|
//ffmpeg -i "${video}" -compression_algo raw -pix_fmt rgb24 "${tmpoutput}"
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
let stdout = '';
|
let stdout = '';
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -249,8 +249,12 @@ class FFMPEG {
|
||||||
try {
|
try {
|
||||||
await mkdir(tmppath);
|
await mkdir(tmppath);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
if (err.code && err.code === 'EEXIST') {
|
||||||
|
//directory exists
|
||||||
|
} else {
|
||||||
this.log.error(err);
|
this.log.error(err);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//ffmpeg -i "${video}" -compression_algo raw -pix_fmt rgb24 "${tmpoutput}"
|
//ffmpeg -i "${video}" -compression_algo raw -pix_fmt rgb24 "${tmpoutput}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue