mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
add a comment to explain the why
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user