--- gtkfilesystemunix.c.~1.52.2.2.~	2005-03-26 23:48:02.000000000 -0500
+++ gtkfilesystemunix.c	2005-04-29 16:01:40.000000000 -0400
@@ -373,7 +373,7 @@
   GtkFileFolderUnix *folder_unix;
   const char *filename;
   char *filename_copy;
-  time_t now = time (NULL);
+  gboolean set_asof = FALSE;
 
   system_unix = GTK_FILE_SYSTEM_UNIX (file_system);
 
@@ -387,8 +387,8 @@
   if (folder_unix)
     {
       g_free (filename_copy);
-      if (now - folder_unix->asof >= FOLDER_CACHE_LIFETIME &&
-	  folder_unix->stat_info)
+      if (folder_unix->stat_info &&
+	  time (NULL) - folder_unix->asof >= FOLDER_CACHE_LIFETIME)
 	{
 #if 0
 	  g_print ("Cleaning out cached directory %s\n", filename);
@@ -397,6 +397,7 @@
 	  folder_unix->stat_info = NULL;
 	  folder_unix->have_mime_type = FALSE;
 	  folder_unix->have_stat = FALSE;
+	  set_asof = TRUE;
 	}
 
       g_object_ref (folder_unix);
@@ -451,9 +452,9 @@
       folder_unix->filename = filename_copy;
       folder_unix->types = types;
       folder_unix->stat_info = NULL;
-      folder_unix->asof = now;
       folder_unix->have_mime_type = FALSE;
       folder_unix->have_stat = FALSE;
+      set_asof = TRUE;
 
       g_hash_table_insert (system_unix->folder_hash,
 			   folder_unix->filename,
@@ -466,6 +467,9 @@
   if ((types & GTK_FILE_INFO_MIME_TYPE) != 0)
     fill_in_mime_type (folder_unix);
 
+  if (set_asof)
+    folder_unix->asof = time (NULL);
+
   return GTK_FILE_FOLDER (folder_unix);
 }
 
