Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl App {
}

/// Run the application.
pub fn run(mut self) -> Result<(), RuntimeError> {
pub fn run(self) -> Result<(), RuntimeError> {
// DYNAMIC DISPATCH POLICY:
//
// Errors rarely occur, therefore, using dynamic dispatch to report errors have an acceptable
Expand Down Expand Up @@ -156,11 +156,7 @@ impl App {
}

if cfg!(unix) && self.args.deduplicate_hardlinks && self.args.files.len() > 1 {
// Hardlinks deduplication doesn't work properly if there are more than 1 paths pointing to
// the same tree or if a path points to a subtree of another path. Therefore, we must find
// and remove such overlapping paths before they cause problems.
use overlapping_arguments::{remove_overlapping_paths, RealApi};
remove_overlapping_paths::<RealApi>(&mut self.args.files);
return Err(RuntimeError::DeduplicateHardlinkMultipleArgs);
}

let report_error = if self.args.silent_errors {
Expand Down Expand Up @@ -331,4 +327,3 @@ impl App {

mod hdd;
mod mount_point;
mod overlapping_arguments;
126 changes: 0 additions & 126 deletions src/app/overlapping_arguments.rs

This file was deleted.

This file was deleted.

Loading
Loading