[LON-CAPA-cvs] cvs: loncom /misc cleanup_file_caches.pl

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 22 Dec 2004 19:11:08 -0000


albertel		Wed Dec 22 14:11:08 2004 EDT

  Modified files:              
    /loncom/misc	cleanup_file_caches.pl 
  Log:
  - how about we actually do somethign about cleaning up
  
  
Index: loncom/misc/cleanup_file_caches.pl
diff -u loncom/misc/cleanup_file_caches.pl:1.3 loncom/misc/cleanup_file_caches.pl:1.4
--- loncom/misc/cleanup_file_caches.pl:1.3	Wed May 12 15:28:55 2004
+++ loncom/misc/cleanup_file_caches.pl	Wed Dec 22 14:11:08 2004
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 # The LearningOnline Network
 #
-# $Id: cleanup_file_caches.pl,v 1.3 2004/05/12 19:28:55 albertel Exp $
+# $Id: cleanup_file_caches.pl,v 1.4 2004/12/22 19:11:08 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -62,7 +62,7 @@
     my $filename = $File::Find::name;
     return if (! -f $filename); # We only want files
     my $inode =stat($filename);
-    if ($inode->atime < $killtime) {
+    if ((time-$inode->atime) > $killtime) {
         unlink($filename);
     }
 }