mirror of
https://github.com/uutils/coreutils
synced 2024-11-17 02:08:09 +00:00
add a comment to explain the why
This commit is contained in:
parent
5b417e251d
commit
83bb8795bd
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue