Skip to content

Commit

Permalink
mv: fix GNU test tests/mv/into-self-2.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Skryptonyte committed Jun 10, 2023
1 parent 0f5ac12 commit 3435ec9
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 @@ -25,7 +25,7 @@ use std::path::{Path, PathBuf};
use uucore::backup_control::{self, BackupMode};
use uucore::display::Quotable;
use uucore::error::{set_exit_code, FromIo, UError, UResult, USimpleError, UUsageError};
use uucore::fs::are_hardlinks_to_same_file;
use uucore::fs::are_hardlinks_or_oneway_symlink_to_same_file;
use uucore::update_control::{self, UpdateMode};
use uucore::{format_usage, help_about, help_section, help_usage, prompt_yes, show};

Expand Down Expand Up @@ -255,7 +255,7 @@ fn handle_two_paths(source: &Path, target: &Path, b: &Behavior) -> UResult<()> {
return Err(MvError::NoSuchFile(source.quote().to_string()).into());
}

if (source.eq(target) || are_hardlinks_to_same_file(source, target))
if (source.eq(target) || are_hardlinks_or_oneway_symlink_to_same_file(source, target))
&& b.backup != BackupMode::SimpleBackup
{
if source.eq(Path::new(".")) || source.ends_with("/.") || source.is_file() {
Expand Down

0 comments on commit 3435ec9

Please sign in to comment.