Remove use of deprecated fs.rmdir

Using fs.rm({recursive: true}) instead.

Fixes #502
This commit is contained in:
Daz DeBoer 2023-02-06 12:39:23 -07:00
parent 50f436c485
commit b47aad4750
No known key found for this signature in database
GPG key ID: DD6B9F0B06683D5D
5 changed files with 5 additions and 5 deletions

2
dist/main/index.js vendored
View file

@ -68588,7 +68588,7 @@ function tryDelete(file) {
try { try {
const stat = fs.lstatSync(file); const stat = fs.lstatSync(file);
if (stat.isDirectory()) { if (stat.isDirectory()) {
fs.rmdirSync(file, { recursive: true }); fs.rmSync(file, { recursive: true });
} }
else { else {
fs.unlinkSync(file); fs.unlinkSync(file);

File diff suppressed because one or more lines are too long

2
dist/post/index.js vendored
View file

@ -67639,7 +67639,7 @@ function tryDelete(file) {
try { try {
const stat = fs.lstatSync(file); const stat = fs.lstatSync(file);
if (stat.isDirectory()) { if (stat.isDirectory()) {
fs.rmdirSync(file, { recursive: true }); fs.rmSync(file, { recursive: true });
} }
else { else {
fs.unlinkSync(file); fs.unlinkSync(file);

File diff suppressed because one or more lines are too long

View file

@ -223,7 +223,7 @@ export async function tryDelete(file: string): Promise<void> {
try { try {
const stat = fs.lstatSync(file) const stat = fs.lstatSync(file)
if (stat.isDirectory()) { if (stat.isDirectory()) {
fs.rmdirSync(file, {recursive: true}) fs.rmSync(file, {recursive: true})
} else { } else {
fs.unlinkSync(file) fs.unlinkSync(file)
} }