Remove deprecated fs.rmdirSync

This commit is contained in:
Girish Ramakrishnan
2022-02-16 20:30:33 -08:00
parent 149f778652
commit dfebda7170
2 changed files with 2 additions and 2 deletions

View File

@@ -147,7 +147,7 @@ async function deleteAppDir(app, options) {
if (safe.error.code !== 'ENOENT') throw new BoxError(BoxError.FS_ERROR, `Error unlinking dir ${appDataDir} : ${safe.error.message}`);
}
} else {
if (!safe.fs.rmdirSync(appDataDir)) {
if (!safe.fs.rmSync(appDataDir, { recursive: true })) {
if (safe.error.code !== 'ENOENT') throw new BoxError(BoxError.FS_ERROR, `Error removing dir ${appDataDir} : ${safe.error.message}`);
}
}