--- loncom/xml/scripttag.pm 2000/08/16 18:32:58 1.13 +++ loncom/xml/scripttag.pm 2000/09/14 20:57:49 1.14 @@ -76,6 +76,10 @@ sub start_import { $bodytext=Apache::run::evaluate($bodytext,$safeeval,$$parstack[$#$parstack]); my $file=&getfile($bodytext); + if ($file eq -1) { + return " Unable to find $bodytext for import"; + } + my $tempparser=HTML::TokeParser->new(\$file); push (@$parser,$tempparser); @@ -110,6 +114,7 @@ sub getfile { &Apache::lonnet::subscribe($filename); &Apache::lonnet::repcopy($filename); } + if (! -e $filename ) { return -1; }; my $fh=Apache::File->new($filename); while (<$fh>) { $a .=$_;