--- loncom/lond 2004/09/14 11:45:04 1.255 +++ loncom/lond 2004/09/14 20:18:41 1.258 @@ -2,7 +2,7 @@ # The LearningOnline Network # lond "LON Daemon" Server (port "LOND" 5663) # -# $Id: lond,v 1.255 2004/09/14 11:45:04 foxr Exp $ +# $Id: lond,v 1.258 2004/09/14 20:18:41 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -57,7 +57,7 @@ my $DEBUG = 0; # Non zero to ena my $status=''; my $lastlog=''; -my $VERSION='$Revision: 1.255 $'; #' stupid emacs +my $VERSION='$Revision: 1.258 $'; #' stupid emacs my $remoteVERSION; my $currenthostid="default"; my $currentdomainid; @@ -2091,7 +2091,14 @@ sub mkdir_user_file_handler { if (-e $udir) { my $newdir=$udir.'/userfiles/'.$ufile; if (!-e $newdir) { - mkdir($newdir); + my @parts=split('/',$newdir); + my $path; + foreach my $part (@parts) { + $path .= '/'.$part; + if (!-e $path) { + mkdir($path,0770); + } + } if (!-e $newdir) { &Failure($client, "failed\n", "$cmd:$tail"); } else { @@ -3818,41 +3825,6 @@ sub get_institutional_code_format_handle 0,1,0); # -# Portofolio directory list: -# -# Parameters: -# cmd - Command request that got us called. -# tail - the remainder of the command line. In this case this is a colon -# separated list containing the username and domain. -# used to locate their portfolio. -# client - Socket openon the client. -# Returns: -# 1 indicating processing should continue. -# -sub list_portfolio { - my ($cmd, $tail, $client) = @_; - my ($uname, $udom) = split(/:/, $tail); - my $userinput = "$cmd:$tail"; - - my $udir=propath($udom,$uname).'/userfiles/portfolio'; - my $dirLine=''; - my $dirContents=''; - if (opendir(LSDIR,$udir.'/')){ - while ($dirLine = readdir(LSDIR)){ - $dirContents = $dirContents.$dirLine.'
'; - } - } else { - $dirContents = "No directory found\n"; - } - &Reply( $client, $dirContents."\n", $userinput); - - - - return 1; -} -®ister_handler("portls", \&list_portfolio, 0,1,0); - -# # # #