diff options
author | 2014-02-26 10:48:48 +0100 | |
---|---|---|
committer | 2014-02-26 10:48:48 +0100 | |
commit | e495cb7fd8980b2c3dcef28426187c51a1d9de9e (patch) | |
tree | ec129b4913fdd855ede926cd3a65bb9311d4e34c | |
parent | ufed.pl.in: Minor updates to the documentation. (diff) | |
download | ufed-e495cb7fd8980b2c3dcef28426187c51a1d9de9e.tar.gz ufed-e495cb7fd8980b2c3dcef28426187c51a1d9de9e.tar.bz2 ufed-e495cb7fd8980b2c3dcef28426187c51a1d9de9e.zip |
Portage.pm: Determining the make.profile is now secure of make.profile being a file.
-rw-r--r-- | Portage.pm | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -400,11 +400,16 @@ sub _determine_profiles my $mp = undef; (-l $mp_path and $mp = readlink $mp_path) - or (-d $mp_path and $mp = $mp_path); + or (-d $mp_path and $mp = $mp_path) + # Be sure it is not a file either: + or (-f $mp_path and die( + "\n$mp_path is a file.\n" + . " This is an odd setup.\n" + . " Please report this incident!\n")); # make.profile is mandatory and must be a link or directory defined($mp) - or die "$mp_path is neither symlink nor directory\n"; + or die("\n$mp_path is neither symlink nor directory\n"); # Start with the found path, it is the deepest profile child. @_profiles = -l $mp_path ? _norm_path('/etc', $mp) : $mp; |