summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-06-08 00:09:22 +0000
committerThierry Vignaud <tv@mandriva.org>2007-06-08 00:09:22 +0000
commita8111ada7f12b135d6abf5b6d86084b3377da08c (patch)
tree64f06f2e1ced63b8c3b940310d728990d6d15903 /perl-install/standalone
parentc81c7e905391e0c313fe2b89b8b42f5377122608 (diff)
downloaddrakx-a8111ada7f12b135d6abf5b6d86084b3377da08c.tar
drakx-a8111ada7f12b135d6abf5b6d86084b3377da08c.tar.gz
drakx-a8111ada7f12b135d6abf5b6d86084b3377da08c.tar.bz2
drakx-a8111ada7f12b135d6abf5b6d86084b3377da08c.tar.xz
drakx-a8111ada7f12b135d6abf5b6d86084b3377da08c.zip
(search_windows_font) simplify it by puting error management out of loop
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/drakfont15
1 files changed, 5 insertions, 10 deletions
diff --git a/perl-install/standalone/drakfont b/perl-install/standalone/drakfont
index 97af4f1a4..5f85e347b 100755
--- a/perl-install/standalone/drakfont
+++ b/perl-install/standalone/drakfont
@@ -209,17 +209,12 @@ sub search_windows_font() {
}
}
my $nb_dir = @fonts;
+ if (!$nb_dir) {
+ err_dialog(N("Error"), N("No fonts found"));
+ return 0;
+ }
foreach my $font (@fonts) {
- foreach my $i (@{ $_->[0] }) {
- if ($interactive) {
- if ($nb_dir) {
- progress($pbar, 0.25 / $nb_dir, N("parse all fonts"));
- } else {
- err_dialog(N("Error"), N("No fonts found"));
- return 0;
- }
- }
-
+ progress($pbar, 0.25 / $nb_dir, N("parse all fonts"));
my $font_name = basename($font);
!$replace && any { /^$font_name$/ } @installed_fonts and next;
any { /^$font_name$/ } @font_list or push @font_list, $font;