Skip to content

Commit

Permalink
fix(mv): add error codes to match GNU
Browse files Browse the repository at this point in the history
  • Loading branch information
PThorpe92 committed Sep 29, 2023
1 parent b0e15ae commit 24d7e46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/uu/mv/src/mv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use uucore::backup_control::{self, source_is_target_backup, BackupMode};
use uucore::display::Quotable;
use uucore::error::{set_exit_code, FromIo, UError, UResult, USimpleError, UUsageError};
use uucore::fs::{are_hardlinks_or_one_way_symlink_to_same_file, are_hardlinks_to_same_file};
use uucore::libc::ENOTEMPTY;
use uucore::libc::{EDQUOT, EEXIST, EISDIR, EMLINK, ENOSPC, ENOTEMPTY, ETXTBSY};

Check failure on line 26 in src/uu/mv/src/mv.rs

View workflow job for this annotation

GitHub Actions / Style/spelling (ubuntu-latest, feat_os_unix)

ERROR: Unknown word (EDQUOT) (file:'src/uu/mv/src/mv.rs', line:26)

Check failure on line 26 in src/uu/mv/src/mv.rs

View workflow job for this annotation

GitHub Actions / Style/spelling (ubuntu-latest, feat_os_unix)

ERROR: Unknown word (EISDIR) (file:'src/uu/mv/src/mv.rs', line:26)

Check failure on line 26 in src/uu/mv/src/mv.rs

View workflow job for this annotation

GitHub Actions / Style/spelling (ubuntu-latest, feat_os_unix)

ERROR: Unknown word (EMLINK) (file:'src/uu/mv/src/mv.rs', line:26)

Check failure on line 26 in src/uu/mv/src/mv.rs

View workflow job for this annotation

GitHub Actions / Style/spelling (ubuntu-latest, feat_os_unix)

ERROR: Unknown word (ENOSPC) (file:'src/uu/mv/src/mv.rs', line:26)

Check failure on line 26 in src/uu/mv/src/mv.rs

View workflow job for this annotation

GitHub Actions / Style/spelling (ubuntu-latest, feat_os_unix)

ERROR: Unknown word (ETXTBSY) (file:'src/uu/mv/src/mv.rs', line:26)
use uucore::update_control::{self, UpdateMode};
use uucore::{format_usage, help_about, help_section, help_usage, prompt_yes, show};

Expand Down Expand Up @@ -401,7 +401,7 @@ fn move_files_into_dir(files: &[PathBuf], target_dir: &Path, b: &Behavior) -> UR
Err(e) if e.to_string().is_empty() => set_exit_code(1),
Err(e) => {
match e.raw_os_error() {
Some(ENOTEMPTY) => {
Some(ENOTEMPTY | EEXIST | EDQUOT | EISDIR | ENOSPC | EMLINK | ETXTBSY) => {

Check failure on line 404 in src/uu/mv/src/mv.rs

View workflow job for this annotation

GitHub Actions / Style/spelling (ubuntu-latest, feat_os_unix)

ERROR: Unknown word (EDQUOT) (file:'src/uu/mv/src/mv.rs', line:404)

Check failure on line 404 in src/uu/mv/src/mv.rs

View workflow job for this annotation

GitHub Actions / Style/spelling (ubuntu-latest, feat_os_unix)

ERROR: Unknown word (EISDIR) (file:'src/uu/mv/src/mv.rs', line:404)

Check failure on line 404 in src/uu/mv/src/mv.rs

View workflow job for this annotation

GitHub Actions / Style/spelling (ubuntu-latest, feat_os_unix)

ERROR: Unknown word (ENOSPC) (file:'src/uu/mv/src/mv.rs', line:404)

Check failure on line 404 in src/uu/mv/src/mv.rs

View workflow job for this annotation

GitHub Actions / Style/spelling (ubuntu-latest, feat_os_unix)

ERROR: Unknown word (EMLINK) (file:'src/uu/mv/src/mv.rs', line:404)

Check failure on line 404 in src/uu/mv/src/mv.rs

View workflow job for this annotation

GitHub Actions / Style/spelling (ubuntu-latest, feat_os_unix)

ERROR: Unknown word (ETXTBSY) (file:'src/uu/mv/src/mv.rs', line:404)
// The error message was changed to match GNU's decision
// when an issue was filed. These will match when merged upstream.
let e = e
Expand Down

0 comments on commit 24d7e46

Please sign in to comment.