[LON-CAPA-cvs] cvs: loncom / lontrans.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 16 Jan 2006 19:27:09 -0000


albertel		Mon Jan 16 14:27:09 2006 EDT

  Modified files:              
    /loncom	lontrans.pm 
  Log:
  - @ufile might not have a value
  
  
Index: loncom/lontrans.pm
diff -u loncom/lontrans.pm:1.9 loncom/lontrans.pm:1.10
--- loncom/lontrans.pm:1.9	Fri Jul  2 03:58:01 2004
+++ loncom/lontrans.pm	Mon Jan 16 14:27:09 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # URL translation for User Files
 #
-# $Id: lontrans.pm,v 1.9 2004/07/02 07:58:01 albertel Exp $
+# $Id: lontrans.pm,v 1.10 2006/01/16 19:27:09 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -40,7 +40,7 @@
         my $fn = $r->uri();
         $fn=~s/^\/raw//;
         my (undef,undef,$udom,$uname,@ufile)=split(/\//,$fn);
-        $ufile[-1]=~s/^[\~\.]+//;
+	if (@ufile) { $ufile[-1]=~s/^[\~\.]+//; }
         my $chome=&Apache::lonnet::homeserver($uname,$udom);
 	my $allowed=0;
 	my @ids=&Apache::lonnet::current_machine_ids();