From 83bb8795bd75aaae907d5b339e50ef64279ed82e Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 30 May 2021 09:16:46 +0200 Subject: [PATCH] add a comment to explain the why --- src/uu/rmdir/src/rmdir.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/uu/rmdir/src/rmdir.rs b/src/uu/rmdir/src/rmdir.rs index 6f0a2ffa9..6b6db0b65 100644 --- a/src/uu/rmdir/src/rmdir.rs +++ b/src/uu/rmdir/src/rmdir.rs @@ -108,6 +108,7 @@ fn remove_dir(path: &Path, ignore: bool, verbose: bool) -> Result<(), i32> { let mut read_dir = match fs::read_dir(path) { Ok(m) => m, Err(e) if e.raw_os_error() == Some(ENOTDIR) => { + // To match the GNU output show_error!("failed to remove '{}': Not a directory", path.display()); return Err(1); }