mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
Merge pull request #8035 from cakebaker/ln_rename_error_variant
ln: rename error variant
This commit is contained in:
commit
f2579e52f2
1 changed files with 2 additions and 2 deletions
|
@ -48,7 +48,7 @@ pub enum OverwriteMode {
|
|||
#[derive(Error, Debug)]
|
||||
enum LnError {
|
||||
#[error("target {} is not a directory", _0.quote())]
|
||||
TargetIsDirectory(PathBuf),
|
||||
TargetIsNotADirectory(PathBuf),
|
||||
|
||||
#[error("")]
|
||||
SomeLinksFailed,
|
||||
|
@ -283,7 +283,7 @@ fn exec(files: &[PathBuf], settings: &Settings) -> UResult<()> {
|
|||
#[allow(clippy::cognitive_complexity)]
|
||||
fn link_files_in_dir(files: &[PathBuf], target_dir: &Path, settings: &Settings) -> UResult<()> {
|
||||
if !target_dir.is_dir() {
|
||||
return Err(LnError::TargetIsDirectory(target_dir.to_owned()).into());
|
||||
return Err(LnError::TargetIsNotADirectory(target_dir.to_owned()).into());
|
||||
}
|
||||
// remember the linked destinations for further usage
|
||||
let mut linked_destinations: HashSet<PathBuf> = HashSet::with_capacity(files.len());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue