--- loncom/lonnet/perl/lonnet.pm 2008/04/16 22:59:36 1.955 +++ loncom/lonnet/perl/lonnet.pm 2008/04/21 15:58:12 1.956 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.955 2008/04/16 22:59:36 raeburn Exp $ +# $Id: lonnet.pm,v 1.956 2008/04/21 15:58:12 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -6264,7 +6264,7 @@ sub dirlist { if($udom) { if($uname) { $listing = &reply('ls3:'.&escape('/'.$uri).':'.$getpropath.':' - .$getuserdir.':'.&escape($alternateRoot) + .$getuserdir.':'.&escape($dirRoot) .':'.&escape($uname).':'.&escape($udom), &homeserver($uname,$udom)); if ($listing eq 'unknown_cmd') { @@ -6371,8 +6371,10 @@ sub stat_file { # unable to handle the uri return (); } - - my $getpropath = 1; + my $getpropath; + if ($file =~ /^userfiles\//) { + $getpropath = 1; + } my ($result) = &dirlist($file,$udom,$uname,$getpropath); my @stats = split('&', $result); @@ -8118,6 +8120,8 @@ sub filelocation { } elsif ($file=~m{^/home/$match_username/public_html/}) { # is a correct contruction space reference $location = $file; + } elsif ($file =~ m-^\Q$Apache::lonnet::perlvar{'lonTabDir'}\E/-) { + $location = $file; } elsif ($file=~/^\/*(uploaded|editupload)/) { # is an uploaded file my ($udom,$uname,$filename)= ($file=~m -^/+(?:uploaded|editupload)/+($match_domain)/+($match_name)/+(.*)$-);