From 8fd565d2f15e74efef87f3b0cf17b12909df68bb Mon Sep 17 00:00:00 2001 From: Tim Cross Date: Tue, 11 Aug 2020 11:31:31 +1000 Subject: [PATCH] Added note about using recursive flag with rmdir --- README.md | 2 ++ README.org | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/README.md b/README.md index 70ec76b..c6207d5 100644 --- a/README.md +++ b/README.md @@ -760,6 +760,8 @@ Remove a directory. If removing a directory and recursive flag is set to `true`, - **path:** string. Path to remote directory - **recursive:** boolean. If true, remove all files and directories in target directory. Defaults to false +**Note**: There has been at least one report that some SFTP servers will allow non-empty directories to be removed even without the recursive flag being set to true. While this is not standard behaviour, it is recommended that users verify the behaviour of rmdir if there are plans to rely on the recursive flag to prevent removal of non-empty directories. + 1. Example Use ```javascript diff --git a/README.org b/README.org index 41759b6..eb1457f 100644 --- a/README.org +++ b/README.org @@ -875,6 +875,12 @@ action will fail. - recursive :: boolean. If true, remove all files and directories in target directory. Defaults to false +*Note*: There has been at least one report that some SFTP servers will allow +non-empty directories to be removed even without the recursive flag being set to +true. While this is not standard behaviour, it is recommended that users verify +the behaviour of rmdir if there are plans to rely on the recursive flag to +prevent removal of non-empty directories. + **** Example Use #+begin_src javascript