Make sure we are actually in foreign module call mode

This commit is contained in:
Jamie Cameron
2013-02-04 12:26:16 -08:00
parent afe3eef0ca
commit 706cea3eb9

View File

@@ -4211,7 +4211,7 @@ if (&get_miniserv_config(\%miniserv)) {
# Work out which module we are in, and read the per-module config file
$0 =~ s/\\/\//g; # Force consistent path on Windows
if (defined($ENV{'FOREIGN_MODULE_NAME'})) {
if (defined($ENV{'FOREIGN_MODULE_NAME'}) && $ENV{'FOREIGN_ROOT_DIRECTORY'}) {
# In a foreign call - use the module name given
$root_directory = $ENV{'FOREIGN_ROOT_DIRECTORY'};
$module_name = $ENV{'FOREIGN_MODULE_NAME'};