From a11fbaf68c2bf81424c1ca8381e2043b5b56711b Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 14 May 2007 17:58:57 +0000 Subject: 11484: allow zmv to rename to equivalent but differently named files --- Functions/Misc/zmv | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'Functions/Misc/zmv') diff --git a/Functions/Misc/zmv b/Functions/Misc/zmv index 553579232..e85b0b5ae 100644 --- a/Functions/Misc/zmv +++ b/Functions/Misc/zmv @@ -262,13 +262,8 @@ for f in $files; do continue elif [[ -n $from[$g] && ! -d $g ]]; then errs=($errs "$f and $from[$g] both map to $g") - elif [[ -f $g && -z $opt_f ]]; then - if [[ $f != $g && $f -ef $g ]]; then - errs=($errs "file exists: $g -(Probably the same file, owing to file system limitations.)") - else - errs=($errs "file exists: $g") - fi + elif [[ -f $g && -z $opt_f && ! ($f -ef $g && $action = mv) ]]; then + errs=($errs "file exists: $g") fi from[$g]=$f to[$f]=$g -- cgit 1.4.1