diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index 9ff200f03..052572d93 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -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'};