From 73c563a4f07da59e19c7173e8fde84de04ed628e Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 10 Nov 2016 23:19:14 +0000 Subject: fira (10nov16) git-svn-id: svn://tug.org/texlive/trunk@42481 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/bin/ctan2tl | 1 + Master/tlpkg/libexec/ctan2tds | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Master/tlpkg/bin/ctan2tl b/Master/tlpkg/bin/ctan2tl index 8c7a29d0068..f392fbc053d 100755 --- a/Master/tlpkg/bin/ctan2tl +++ b/Master/tlpkg/bin/ctan2tl @@ -133,6 +133,7 @@ find $pkg -depth -type d | xargs rmdir 2>/dev/null # remove empty directories spacenames="`find $pkg -name \*\ \*`" if test -n "$spacenames"; then echo "$0: cooked hierarchy contains files with spaces, goodbye:" >&2 + echo "in `pwd`/$pkg:" >&2 echo "$spacenames" >&2 exit 1 fi diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index 245e8d7ddee..75d33b1d09d 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -3038,7 +3038,9 @@ for (@ARGV) { # sub sanitize_file_names { my ($dir) = @_; - &SYSTEM ("find $dir -print | xargs rename 's![^-_A-Za-z0-9.,/+]!!g'"); + # -0 in case of spaces or other chars in filenames, which would be + # parsed into words by the shell otherwise. + &SYSTEM ("find $dir -print0 | xargs -0 /l/bin/rename 's![^-_A-Za-z0-9.,/+]!!g'"); } -- cgit v1.2.3