From eebd56b07f97be81bfc523829a688f3776818190 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 10 Dec 2007 10:39:38 -0600 Subject: [PATCH] install: handle spaces in file names As noted in the FIXME comment, it is probably better all around to simply remove spaces from file names. --- Makefile.PL | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index e29daba5df..034df5e0e9 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -563,10 +563,16 @@ sub _add_to_file_map { } } elsif ($targetdir ne 'NONE' and $targetdir ne '') { my $source = File::Spec->catfile(@$curr_path, $file); - return if $source =~ / /; #FIXME - #my $destination = File::Spec->catfile("\$($targetdir)", @$dest_path, $file); my $destination = File::Spec->catfile('blib', $targetdir, @$dest_path, $file); #print "$source => $destination\n"; # DEBUG + # quote spaces in file names + # FIXME: this is of questionable portability and + # probably depends on user's make recognizing this + # quoting syntax -- probably better to remove + # spaces and shell metacharacters from all file names + $source =~ s/ /\\ /g; + $destination =~ s/ /\\ /g; + $file_map->{$source} = $destination; } } @@ -888,6 +894,5 @@ ExtUtils::MakeMaker(3) MJ Ray mjr at phonecoop.coop =cut -FIXME: deal with files that have spaces in names FIXME: Zebra lang/MARC mapping FIXME: deal with .htaccess -- 2.39.5