diff lib/cache.c @ 253:a46c2eef5139

2003-8-11 Brian Masney <masneyb@gftp.org> * src/gtk/delete_dialog.c - don't attempt to clear the cache for the protocols that have the cache disabled * lib/local.c (local_chdir) - if request->directory == directory, don't free the request->directory and run getcwd(). This fixes a double free in the delete dialog in the GTK+ port * lib/gftp.h - added FIXME comment * lib/cache.c (gftp_delete_cache_entry) - added assertion
author masneyb
date Tue, 12 Aug 2003 00:04:37 +0000
parents 094e83b55cb1
children 0fcc6468a0af
line wrap: on
line diff
--- a/lib/cache.c	Sat Aug 09 05:44:36 2003 +0000
+++ b/lib/cache.c	Tue Aug 12 00:04:37 2003 +0000
@@ -291,7 +291,8 @@
 
 
 void
-gftp_delete_cache_entry (gftp_request * request, char *descr, int ignore_directory)
+gftp_delete_cache_entry (gftp_request * request, char *descr, 
+                         int ignore_directory)
 {
   char *oldindexfile, *newindexfile, buf[BUFSIZ], description[BUFSIZ];
   gftp_getline_buffer * rbuf;
@@ -300,8 +301,9 @@
   time_t now;
   int remove;
  
+  g_return_if_fail (request != NULL || descr != NULL);
+
   time (&now);
-
   if (request != NULL)
     {
       gftp_generate_cache_description (request, description, sizeof (description),