summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-09-20 20:32:05 +0000
committerThierry Vignaud <tv@mageia.org>2012-09-20 20:32:05 +0000
commitfa7f54e968cebad63914465a603aa65eef9af1be (patch)
tree95e3cdfdd5279fa1b0f62c9f18da0ea3d47a8c7a /perl-install
parent2d05f7a5a2e3550307e1696ccf757cdfaa8732ae (diff)
downloaddrakx-fa7f54e968cebad63914465a603aa65eef9af1be.tar
drakx-fa7f54e968cebad63914465a603aa65eef9af1be.tar.gz
drakx-fa7f54e968cebad63914465a603aa65eef9af1be.tar.bz2
drakx-fa7f54e968cebad63914465a603aa65eef9af1be.tar.xz
drakx-fa7f54e968cebad63914465a603aa65eef9af1be.zip
(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
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS2
-rwxr-xr-xperl-install/standalone/drakfont5
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$/) {