diff --git a/.local/bin/fixnames b/.local/bin/fixnames index c76869ae..d8401246 100644 --- a/.local/bin/fixnames +++ b/.local/bin/fixnames @@ -2,7 +2,7 @@ [ "$(id -u)" = "0" ] && echo "This script should not be run as root" >&2 && exit 1 -find . -depth \( -name '.*' -prune \) -o -name '*' -print0 | xargs -0 -n1 -P10 -I{} sh -c ' +find . -type d -path '*/.*' -prune -o -print0 | xargs -0 -n1 -P10 -I{} sh -c ' generate_unique_name() { base_name="$1"; ext="$2"; dest_path="$3"; count=1 [ -z "$ext" ] && new_name="$base_name" || new_name="${base_name}.${ext}"