From 9948036ee05093e60e82a6cf90d33a25e4b03226 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Wed, 3 Feb 2021 20:18:50 +0100 Subject: [PATCH] fs: remove permissive rmdir recursive PR-URL: https://github.com/nodejs/node/pull/37216 Reviewed-By: James M Snell Reviewed-By: Ben Coe Reviewed-By: Ian Sutherland Reviewed-By: Rich Trott Reviewed-By: Michael Dawson --- doc/api/fs.md | 63 +++++++++++++------ lib/fs.js | 20 ++++-- lib/internal/fs/promises.js | 5 +- lib/internal/fs/utils.js | 22 ++++--- ...fs-rmdir-recursive-sync-warns-not-found.js | 7 ++- ...t-fs-rmdir-recursive-sync-warns-on-file.js | 7 ++- ...est-fs-rmdir-recursive-throws-not-found.js | 36 +++++++++++ .../test-fs-rmdir-recursive-throws-on-file.js | 29 +++++++++ .../test-fs-rmdir-recursive-warns-on-file.js | 6 +- test/parallel/test-fs-rmdir-recursive.js | 15 +++-- 10 files changed, 167 insertions(+), 43 deletions(-) create mode 100644 test/parallel/test-fs-rmdir-recursive-throws-not-found.js create mode 100644 test/parallel/test-fs-rmdir-recursive-throws-on-file.js diff --git a/doc/api/fs.md b/doc/api/fs.md index 5ffd9df27451a4..899929a01db695 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -1048,6 +1048,16 @@ Renames `oldPath` to `newPath`.