--- loncom/lonnet/perl/lonnet.pm 2002/10/01 07:59:33 1.288 +++ loncom/lonnet/perl/lonnet.pm 2002/10/01 19:09:27 1.289 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.288 2002/10/01 07:59:33 albertel Exp $ +# $Id: lonnet.pm,v 1.289 2002/10/01 19:09:27 bowersj2 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1986,14 +1986,15 @@ sub is_on_map { my @uriparts=split(/\//,$uri); my $filename=$uriparts[$#uriparts]; my $pathname=$uri; - $pathname=~s/\/$filename$//; + $pathname=~s|/\Q$filename\E$||; + #Trying to find the conditional for the file my $match=($ENV{'acc.res.'.$ENV{'request.course.id'}.'.'.$pathname}=~ - /\&$filename\:([\d\|]+)\&/); + /\&\Q$filename\E\:([\d\|]+)\&/); if ($match) { - return (1,$1); - } else { - return (0,0); - } + return (1,$1); + } else { + return (0,0); + } } # ----------------------------------------------------------------- Define Role