From f3c3b1bd92830f9fc2a85a58eab04929703db94f Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 20 Sep 2012 20:32:05 +0000 Subject: (move_fonts) fix moving font files with space in their names (mga#2689) also avoid fork a useless shell (remove_fonts) fix a potential similar issue --- perl-install/standalone/drakfont | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'perl-install/standalone') diff --git a/perl-install/standalone/drakfont b/perl-install/standalone/drakfont index 3e4212984..d2e5a6d55 100755 --- a/perl-install/standalone/drakfont +++ b/perl-install/standalone/drakfont @@ -308,7 +308,8 @@ sub convert_ttf_fonts { sub move_fonts { my ($src_dir, $dest_dir, @extensions) = @_; my @fonts = map { s!.*/!!; $_ } map { glob("$src_dir/*.$_") } @extensions; - system("cd $src_dir && mv @fonts $dest_dir") if @fonts; + next if !@fonts; + system('mv', "$src_dir/$_", $dest_dir) foreach @fonts; } sub my_rm_rf { @@ -411,7 +412,7 @@ sub remove_fonts() { foreach my $i (@font_list) { local $_ = $i; if (/.pfb$/ || /.gsf$/ || /.pfm$/ || /.pfa$/) { - system("mv $_ $drakfont_dir/remove "); + system('mv', $_, "$drakfont_dir/remove"); } else { next if $::testing; if (/.ttf$/) { -- cgit v1.2.1