From fa7f54e968cebad63914465a603aa65eef9af1be 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/NEWS | 2 ++ perl-install/standalone/drakfont | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/perl-install/NEWS b/perl-install/NEWS index 6c770ee57..2c0ca327a 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,5 +1,7 @@ - do not crash when trying to guess homedir before running another process (mga#7403) +- drakfont: + o fix moving font files with space in their names (mga#2689) - harddrake2: o remove useless "Autodetect printers" option 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