summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-12-28 11:03:50 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-12-28 11:03:50 +0000
commite13398a7b50ab981d246b98890b40ecebed6de80 (patch)
tree7982ac1b9c9f7ff90097ee859947df6543204d5c /perl-install
parent81947bb4ff3cc74309d52dabd3e8cf65b930346d (diff)
downloaddrakx-e13398a7b50ab981d246b98890b40ecebed6de80.tar
drakx-e13398a7b50ab981d246b98890b40ecebed6de80.tar.gz
drakx-e13398a7b50ab981d246b98890b40ecebed6de80.tar.bz2
drakx-e13398a7b50ab981d246b98890b40ecebed6de80.tar.xz
drakx-e13398a7b50ab981d246b98890b40ecebed6de80.zip
- mkdir_p throws an exception on error, so "mkdir_p() or ..." is dumb, fixing
(thanks to Lea Gris) - use output()
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/printer/gimp.pm11
1 files changed, 4 insertions, 7 deletions
diff --git a/perl-install/printer/gimp.pm b/perl-install/printer/gimp.pm
index 0b0ebdaed..0a5919503 100644
--- a/perl-install/printer/gimp.pm
+++ b/perl-install/printer/gimp.pm
@@ -229,15 +229,12 @@ sub findconfigfiles {
$dir =~ s,/[^/]*$,,;
next if -f $dir && ! -d $dir;
if (! -d "$::prefix$dir") {
- mkdir_p("$::prefix$dir") or next;
- set_permissions("$::prefix$dir", "$uid.$gid") or next;
+ eval { mkdir_p("$::prefix$dir") } or next;
+ set_permissions("$::prefix$dir", "$uid.$gid") or next;
}
if (! -f "$::prefix$homedir/$file") {
- local *F;
- open F, "> $::prefix$homedir/$file" or next;
- print F "#PRINTRCv1 written by GIMP-PRINT 4.2.2 - 13 Sep 2002\n";
- close F;
- set_permissions("$::prefix$homedir/$file", "$uid.$gid") or next;
+ eval { output("$::prefix$homedir/$file", "#PRINTRCv1 written by GIMP-PRINT 4.2.2 - 13 Sep 2002\n") } or next;
+ set_permissions("$::prefix$homedir/$file", "$uid.$gid") or next;
}
push @filestotreat, "$homedir/$file";
}