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,7 +201,12 @@ class FFMPEG {
|
||||||
await fs_extra_1.mkdir(tmppath);
|
await fs_extra_1.mkdir(tmppath);
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
this.log.error(err);
|
if (err.code && err.code === 'EEXIST') {
|
||||||
|
//directory exists
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
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) => {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -201,7 +201,12 @@ class FFMPEG {
|
||||||
await fs_extra_1.mkdir(tmppath);
|
await fs_extra_1.mkdir(tmppath);
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
this.log.error(err);
|
if (err.code && err.code === 'EEXIST') {
|
||||||
|
//directory exists
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
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) => {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -249,7 +249,11 @@ class FFMPEG {
|
||||||
try {
|
try {
|
||||||
await mkdir(tmppath);
|
await mkdir(tmppath);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.log.error(err);
|
if (err.code && err.code === 'EEXIST') {
|
||||||
|
//directory exists
|
||||||
|
} else {
|
||||||
|
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