Skip to content

Commit f445acd

Browse files
committed
ls: Add NotADirectory message
1 parent 0f891cc commit f445acd

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

src/uu/ls/locales/en-US.ftl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ ls-error-unknown-io-error = unknown io error: {$path}, '{$error}'
2323
ls-error-invalid-block-size = invalid --block-size argument {$size}
2424
ls-error-dired-and-zero-incompatible = --dired and --zero are incompatible
2525
ls-error-not-listing-already-listed = {$path}: not listing already-listed directory
26+
ls-error-not-directory = {$path}: A path component was not a directory
2627
ls-error-invalid-time-style = invalid --time-style argument {$style}
2728
Possible values are:
2829
- [posix-]full-iso

src/uu/ls/src/ls.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ enum LsError {
186186

187187
#[error("{}", match .1.kind() {
188188
ErrorKind::NotFound => translate!("ls-error-cannot-access-no-such-file", "path" => .0.quote()),
189+
ErrorKind::NotADirectory => translate!("ls-error-not-directory", "path" => .0.quote()),
189190
ErrorKind::PermissionDenied => match .1.raw_os_error().unwrap_or(1) {
190191
1 => translate!("ls-error-cannot-access-operation-not-permitted", "path" => .0.quote()),
191192
_ => if .0.is_dir() {

0 commit comments

Comments
 (0)