[LON-CAPA-cvs] cvs: loncom / lond /interface lonhelper.pm

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Sat, 06 Sep 2008 00:47:22 -0000


raeburn		Fri Sep  5 20:47:22 2008 EDT

  Modified files:              
    /loncom	lond 
    /loncom/interface	lonhelper.pm 
  Log:
  Bug 5783.
  - Don't prepend $perlvar{'lonDocRoot'} to $ulsdir when using lond::ls3() to list files in a directory in CSTR.  
  
  
Index: loncom/lond
diff -u loncom/lond:1.407 loncom/lond:1.408
--- loncom/lond:1.407	Mon Jul  7 11:23:41 2008
+++ loncom/lond	Fri Sep  5 20:47:13 2008
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.407 2008/07/07 15:23:41 raeburn Exp $
+# $Id: lond,v 1.408 2008/09/06 00:47:13 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -59,7 +59,7 @@
 my $status='';
 my $lastlog='';
 
-my $VERSION='$Revision: 1.407 $'; #' stupid emacs
+my $VERSION='$Revision: 1.408 $'; #' stupid emacs
 my $remoteVERSION;
 my $currenthostid="default";
 my $currentdomainid;
@@ -1538,7 +1538,7 @@
     } elsif ($alternate_root ne '') {
         $dir_root = $alternate_root;
     }
-    if ($dir_root ne '') {
+    if (($dir_root ne '') && ($dir_root ne '/')) {
         if ($ulsdir =~ /^\//) {
             $ulsdir = $dir_root.$ulsdir;
         } else {
Index: loncom/interface/lonhelper.pm
diff -u loncom/interface/lonhelper.pm:1.164 loncom/interface/lonhelper.pm:1.165
--- loncom/interface/lonhelper.pm:1.164	Sat Sep  8 19:41:49 2007
+++ loncom/interface/lonhelper.pm	Fri Sep  5 20:47:16 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # .helper XML handler to implement the LON-CAPA helper
 #
-# $Id: lonhelper.pm,v 1.164 2007/09/08 23:41:49 albertel Exp $
+# $Id: lonhelper.pm,v 1.165 2008/09/06 00:47:16 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2832,17 +2832,17 @@
 	    &Apache::loncacc::constructaccess($subdir,
 				     $Apache::lonnet::perlvar{'lonDefDomain'});
 	$metadir='/res/'.$domain.'/'.$user.'/'.$2;
-        @fileList = &Apache::lonnet::dirlist($subdir, $domain, $user, '');
+        @fileList = &Apache::lonnet::dirlist($subdir,$domain,$user,undef,undef,'/');
     } elsif ($subdir =~ m|^~([^/]+)/(.*)$|) {
 	$subdir='/home/'.$1.'/public_html/'.$2;
 	my ($user,$domain)= 
 	    &Apache::loncacc::constructaccess($subdir,
 				     $Apache::lonnet::perlvar{'lonDefDomain'});
 	$metadir='/res/'.$domain.'/'.$user.'/'.$2;
-        @fileList = &Apache::lonnet::dirlist($subdir, $domain, $user, '');
+        @fileList = &Apache::lonnet::dirlist($subdir,$domain,$user,undef,undef,'/');
     } else {
         # local library server resource space
-        @fileList = &Apache::lonnet::dirlist($subdir, $env{'user.domain'}, $env{'user.name'}, '');
+        @fileList = &Apache::lonnet::dirlist($subdir,$env{'user.domain'},$env{'user.name'},undef,undef,'/');
     }
 
     # Sort the fileList into order