diff lib/misc.c @ 182:33b394ebba68

2003-6-15 Brian Masney <masneyb@gftp.org> * lib/cache.c lib/gftp.h - added gftp_generate_cache_description(). * lib/cache.c lib/gftp.h src/text/gftp-text.c src/gtk/delete-dialog.c src/gtk/menu-items.c src/gtk/misc-gtk.c src/gtk/mkdir-dialog.c - Added description parameter to gftp_delete_cache_entry(). * lib/protocols.c lib/gftp.h - added gftp_fd_open(). It will call open() and then set the socket option close on exec * lib/cache.c lib/local.c lib/misc.c - use gftp_fd_open() instead of open() * lib/rfc959.c lib/protocols.c - on newly created sockets, make sure the close on exec socket option is set * lib/options.h src/text/gftp-text.c src/gtk/transfer.c - added preserve_permissions option * lib/protocols.c (gftp_parse_url) - allow an @ to be in the username * src/text/gftp-text.c - after transfering a file, honor preserve_permissions if it is set * src/gtk/delete-dialog.c - improvments to clearing the expired cache entries
author masneyb
date Sun, 15 Jun 2003 21:28:02 +0000
parents 4c288d05b26a
children 65eb40fb4f03
line wrap: on
line diff
--- a/lib/misc.c	Sun Jun 15 13:22:09 2003 +0000
+++ b/lib/misc.c	Sun Jun 15 21:28:02 2003 +0000
@@ -239,14 +239,14 @@
   char buf[8192];
   ssize_t n;
 
-  if ((srcfd = open (source, O_RDONLY)) == -1)
+  if ((srcfd = gftp_fd_open (NULL, source, O_RDONLY, 0)) == -1)
     {
       printf (_("Error: Cannot open local file %s: %s\n"),
               source, g_strerror (errno));
       exit (1);
     }
 
-  if ((destfd = open (dest, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR)) == -1)
+  if ((destfd = gftp_fd_open (NULL, dest, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR)) == -1)
     {
       printf (_("Error: Cannot open local file %s: %s\n"),
               dest, g_strerror (errno));