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

@@ -242,7 +242,7 @@ function remove(apiConfig, filename, callback) {
if (stat.isFile()) {
if (!safe.fs.unlinkSync(filename)) return callback(new BoxError(BoxError.EXTERNAL_ERROR, safe.error.message));
} else if (stat.isDirectory()) {
if (!safe.fs.rmdirSync(filename)) return callback(new BoxError(BoxError.EXTERNAL_ERROR, safe.error.message));
if (!safe.fs.rmSync(filename, { recursive: true })) return callback(new BoxError(BoxError.EXTERNAL_ERROR, safe.error.message));
}
callback(null);