--- rat/lonratedt.pm 2001/05/26 19:55:07 1.3 +++ rat/lonratedt.pm 2001/06/30 14:05:57 1.4 @@ -3,7 +3,7 @@ # (TeX Content Handler # # 05/29/00,05/30 Gerd Kortemeyer) -# 7/1 Gerd Kortemeyer +# 7/1,6/30 Gerd Kortemeyer package Apache::lonratedt; @@ -45,6 +45,18 @@ ENDSMPHEAD ''); } +sub nodir { + my ($r,$dir)=@_; + $dir=~s/^\/home\/\w+\/public\_html//; + $r->print(< + +

No such directory: $dir

+ + +ENDNODIR +} + # ================================================================ Main Handler sub handler { @@ -57,6 +69,11 @@ sub handler { my $url=$r->uri; my $fn=&Apache::lonnet::filelocation('',$url); + my ($dir)=($fn=~/^(.+)\/[^\/]+$/); + unless (-e $dir) { + &nodir($r,$dir); + return OK; + } my $adv=0; unless ($ENV{'form.forcesmp'}) {