--- loncom/lond 2002/10/03 15:02:22 1.101 +++ loncom/lond 2002/10/07 13:50:36 1.102 @@ -2,7 +2,7 @@ # The LearningOnline Network # lond "LON Daemon" Server (port "LOND" 5663) # -# $Id: lond,v 1.101 2002/10/03 15:02:22 www Exp $ +# $Id: lond,v 1.102 2002/10/07 13:50:36 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1015,6 +1015,10 @@ sub make_new_child { # ------------------------------------------------------------------- subscribe } elsif ($userinput =~ /^sub/) { print $client &subscribe($userinput,$clientip); +# ------------------------------------------------------------- current version + } elsif ($userinput =~ /^currentversion/) { + my ($cmd,$fname)=split(/:/,$userinput); + print $client ¤tversion($fname)."\n"; # ------------------------------------------------------------------------- log } elsif ($userinput =~ /^log/) { my ($cmd,$udom,$uname,$what)=split(/:/,$userinput); @@ -1655,7 +1659,8 @@ sub currentversion { $ulsdir=$1; } $fname=~s/\.\d+\.(\w+(?:\.meta)*)$/\.$1/; - $fname=~s/\.(\w+)$/\.\(\\d\+\)\.$1\$/; + $fname=~s/\.(\w+(?:\.meta)*)$/\.\(\\d\+\)\.$1\$/; + if (-e $fname) { $version=1; } if (-e $ulsdir) { if(-d $ulsdir) { @@ -1701,6 +1706,10 @@ sub subscribe { my $extension=$2; symlink($root.'.'.$extension, $root.'.'.$currentversion.'.'.$extension); + unless ($extension=~/\.meta$/) { + symlink($root.'.'.$extension.'.meta', + $root.'.'.$currentversion.'.'.$extension.'.meta'); + } } } }