--- loncom/interface/lonhelper.pm 2011/10/31 01:20:05 1.185 +++ loncom/interface/lonhelper.pm 2011/11/05 22:42:14 1.186 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # .helper XML handler to implement the LON-CAPA helper # -# $Id: lonhelper.pm,v 1.185 2011/10/31 01:20:05 raeburn Exp $ +# $Id: lonhelper.pm,v 1.186 2011/11/05 22:42:14 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2976,8 +2976,11 @@ BUTTONS # If the subdirectory is in local CSTR space my $metadir; my $londocroot = $Apache::lonnet::perlvar{'lonDocRoot'}; - if ($subdir =~ m{^\Q$londocroot/priv/\E[^/]+/[^/]+/(.*)$}) { + if ($subdir =~ m{^(?:\Q$londocroot\E)*/priv/[^/]+/[^/]+/(.*)$}) { my $innerpath=$1; + unless ($subdir=~m{^\Q$londocroot\E}) { + $subdir=$londocroot.$subdir; + } my ($user,$domain)= &Apache::loncacc::constructaccess($subdir); $metadir='/res/'.$domain.'/'.$user.'/'.$innerpath;