fix rmDir deprecation warning

This commit is contained in:
tophf 2022-01-30 14:23:02 +03:00
parent 799423629a
commit 84f4262176

View File

@ -60,7 +60,7 @@ function fixLngFile(lng) {
if (resStr !== jsonStr) { if (resStr !== jsonStr) {
let err; let err;
if (resStr === '{}') { if (resStr === '{}') {
fs.rmdirSync(`${DIR}${lng}`, {recursive: true}); fs.rmSync(`${DIR}${lng}`, {recursive: true, force: true});
err = 'no translations -> deleted'; err = 'no translations -> deleted';
} else { } else {
fse.outputFileSync(makeFileName(lng), resStr + '\n'); fse.outputFileSync(makeFileName(lng), resStr + '\n');