diff lib/cache.c @ 555:7f54d0c0edbc

2004-9-17 Brian Masney <masneyb@gftp.org> * lib/misc.c lib/cache.c lib/config_file.c lib/gftp.h lib/protocols.c lib/rfc2068.c lib/sshv2.c src/gtk/bookmarks.c src/gtk/dnd.c src/gtk/gftp-gtk.c src/gtk/gtkui.c src/gtk/menu-items.c src/gtk/misc-gtk.c src/gtk/transfer.c src/uicommon/gftpui.c - added gftp_request argument to gftp_build_path() and expand_path(). Renamed expand_path() to gftp_expand_path() * lib/gftp.h - fixed compile error in gftp_need_username macro
author masneyb
date Fri, 17 Sep 2004 23:37:47 +0000
parents fbb5a02beddb
children d553d14a2565
line wrap: on
line diff
--- a/lib/cache.c	Tue Sep 14 10:24:01 2004 +0000
+++ b/lib/cache.c	Fri Sep 17 23:37:47 2004 +0000
@@ -127,7 +127,7 @@
   time (&t);
   t += cache_ttl;
 
-  cachedir = expand_path (BASE_CONF_DIR "/cache");
+  cachedir = gftp_expand_path (NULL, BASE_CONF_DIR "/cache");
   if (access (cachedir, F_OK) == -1)
     {
       if (mkdir (cachedir, S_IRUSR | S_IWUSR | S_IXUSR) < 0)
@@ -205,7 +205,7 @@
   gftp_generate_cache_description (request, description, sizeof (description),
                                    0);
 
-  indexfile = expand_path (BASE_CONF_DIR "/cache/index.db");
+  indexfile = gftp_expand_path (NULL, BASE_CONF_DIR "/cache/index.db");
   if ((indexfd = gftp_fd_open (NULL, indexfile, O_RDONLY, 0)) == -1)
     {
       g_free (indexfile);
@@ -269,7 +269,7 @@
   gftp_cache_entry centry;
   int indexfd;
 
-  indexfile = expand_path (BASE_CONF_DIR "/cache/index.db");
+  indexfile = gftp_expand_path (NULL, BASE_CONF_DIR "/cache/index.db");
   if ((indexfd = gftp_fd_open (NULL, indexfile, O_RDONLY, 0)) == -1)
     {
       g_free (indexfile);
@@ -318,14 +318,14 @@
   else
     return;
 
-  oldindexfile = expand_path (BASE_CONF_DIR "/cache/index.db");
+  oldindexfile = gftp_expand_path (NULL, BASE_CONF_DIR "/cache/index.db");
   if ((indexfd = gftp_fd_open (NULL, oldindexfile, O_RDONLY, 0)) == -1)
     {
       g_free (oldindexfile);
       return;
     }
 
-  newindexfile = expand_path (BASE_CONF_DIR "/cache/index.db.new");
+  newindexfile = gftp_expand_path (NULL, BASE_CONF_DIR "/cache/index.db.new");
   if ((newfd = gftp_fd_open (request, newindexfile, O_WRONLY | O_CREAT, 
                              S_IRUSR | S_IWUSR)) == -1)
     {