[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Wed, 21 May 2003 15:24:21 -0000
matthew Wed May 21 11:24:21 2003 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
&GetFileTimestamp() was returning the access time NOT the modification time.
This led to the caches in loncoursedata.pm being devalidated erronously.
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.374 loncom/lonnet/perl/lonnet.pm:1.375
--- loncom/lonnet/perl/lonnet.pm:1.374 Mon May 12 20:52:47 2003
+++ loncom/lonnet/perl/lonnet.pm Wed May 21 11:24:20 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.374 2003/05/13 00:52:47 www Exp $
+# $Id: lonnet.pm,v 1.375 2003/05/21 15:24:20 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3084,12 +3084,12 @@
$subdir =~ s/(.)(.)(.).*/$1\/$2\/$3/;
my $proname="$studentDomain/$subdir/$studentName";
$proname .= '/'.$filename;
- my @dir = &Apache::lonnet::dirlist($proname, $studentDomain, $studentName,
- $root);
- my $fileStat = $dir[0];
+ my ($fileStat) = &Apache::lonnet::dirlist($proname, $studentDomain,
+ $studentName, $root);
my @stats = split('&', $fileStat);
if($stats[0] ne 'empty' && $stats[0] ne 'no_such_dir') {
- return $stats[9];
+ # @stats contains first the filename, then the stat output
+ return $stats[10]; # so this is 10 instead of 9.
} else {
return -1;
}