fs.rmdirSync { recursive: true } is deprecated

This commit is contained in:
Girish Ramakrishnan
2025-08-14 13:43:41 +05:30
parent 12e073e8cf
commit f2225ff6b6
8 changed files with 9 additions and 9 deletions

View File

@@ -225,7 +225,7 @@ async function remove(config, remotePath) {
if (stat.isFile()) {
if (!safe.fs.unlinkSync(fullRemotePath)) throw new BoxError(BoxError.EXTERNAL_ERROR, safe.error.message);
} else if (stat.isDirectory()) {
if (!safe.fs.rmdirSync(fullRemotePath, { recursive: false })) throw new BoxError(BoxError.EXTERNAL_ERROR, safe.error.message);
if (!safe.fs.rmdirSync(fullRemotePath)) throw new BoxError(BoxError.EXTERNAL_ERROR, safe.error.message);
}
}