From edfe0713905c0fbeb01674d767b4da7ec9c2de0b Mon Sep 17 00:00:00 2001 From: Paul Colomiets Date: Mon, 26 Oct 2015 18:12:50 +0200 Subject: [PATCH] Documented caveat of the remove_dir_all I'm not sure the wording is great. Maybe it's just a bug that is going to be fixed because the current behavior is probably useless. But if it is, it's a backwards-incompatible change. --- src/libstd/fs.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index 6178f1bbb8e12..2728bd1c4ed4b 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -1046,8 +1046,11 @@ pub fn remove_dir>(path: P) -> io::Result<()> { /// Removes a directory at this path, after removing all its contents. Use /// carefully! /// -/// This function does **not** follow symbolic links and it will simply remove the -/// symbolic link itself. +/// This function does **not** follow symbolic links **inside** the +/// directory and it will simply remove the symbolic link itself. +/// But if a directory is **itself** a symbolic link to a directory +/// it will first clean the target directory, then fail with the +/// "Not a directory" error. /// /// # Errors ///