From 76f575f3c7fec164b849e21ea00de28792c9350f Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 20 Dec 2004 13:35:35 +0000 Subject: (get_user_home) do not horribly die if USER environment variable list a non existing user --- perl-install/network/modem.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/perl-install/network/modem.pm b/perl-install/network/modem.pm index 871019159..c60e1db77 100644 --- a/perl-install/network/modem.pm +++ b/perl-install/network/modem.pm @@ -18,7 +18,8 @@ sub get_user_home() { my $home; if ($ENV{USER} ne "root") { #- kdesu case - $home = (find { $_->[0] eq $ENV{USER} } list_passwd())->[7]; + my $user = find { $_->[0] eq $ENV{USER} } list_passwd(); + $home = $user->[7] if $user; } $home ||= $ENV{HOME}; #- consolehelper case $home; -- cgit v1.2.1