version 1.184, 2004/03/16 20:48:49
|
version 1.185, 2004/03/16 20:57:49
|
Line 1828 sub make_new_child {
|
Line 1828 sub make_new_child {
|
} elsif ($userinput =~ /^fetchuserfile/) { # Client clear or enc. |
} elsif ($userinput =~ /^fetchuserfile/) { # Client clear or enc. |
if(isClient) { |
if(isClient) { |
my ($cmd,$fname)=split(/:/,$userinput); |
my ($cmd,$fname)=split(/:/,$userinput); |
my ($udom,$uname,$ufile) = ($fname =~ /^([^\/]+)\/([^\/]+)\/(.+)$/); |
my ($udom,$uname,$ufile) = ($fname =~ m|^([^/]+)/([^/]+)/(.+)$|); |
my $udir=propath($udom,$uname).'/userfiles'; |
my $udir=propath($udom,$uname).'/userfiles'; |
unless (-e $udir) { mkdir($udir,0770); } |
unless (-e $udir) { mkdir($udir,0770); } |
if (-e $udir) { |
if (-e $udir) { |
$ufile=~s/^[\.\~]+//; |
$ufile=~s/^[\.\~]+//; |
my $path = $udir; |
my $path = $udir; |
if ($ufile =~/(.+)\/([^\/]+)$/) { |
if ($ufile =~m|(.+)/([^/]+)$|) { |
my @parts=split(/\//,$1); |
my @parts=split('/',$1); |
foreach my $part (@parts) { |
foreach my $part (@parts) { |
$path .= '/'.$part; |
$path .= '/'.$part; |
if ((-e $path)!=1) { |
if ((-e $path)!=1) { |
Line 1881 sub make_new_child {
|
Line 1881 sub make_new_child {
|
if (open(ENVIN,$perlvar{'lonIDsDir'}.'/'. |
if (open(ENVIN,$perlvar{'lonIDsDir'}.'/'. |
$session.'.id')) { |
$session.'.id')) { |
while (my $line=<ENVIN>) { |
while (my $line=<ENVIN>) { |
if ($line=~ m|userfile\.$fname\=|) { $reply='ok'; } |
if ($line=~ m|userfile\.\Q$fname\E\=|) { $reply='ok'; } |
} |
} |
close(ENVIN); |
close(ENVIN); |
print $client $reply."\n"; |
print $client $reply."\n"; |