diff lib/protocols.c @ 227:a85a097bbb02

2003-7-20 Brian Masney <masneyb@gftp.org> * lib/config_file.c lib/gftp.h - added compare_function to gftp_config_vars structure. (gftp_set_global_option) use the compare function to see if the value was actually changed, and if so set the gftp_configuration_changed variable * lib/misc.c lib/gftp.h - For glib 1.2, added my version of g_build_path() since it's not there * lib/misc.c - GLIB/GTK+ 1.2 fixes * lib/protocols.c (gftp_fd_open) - cleaned up some * lib/rfc959.c (rfc959_init) - if the email address is blank, get the users address here instead of in register_module. It was being blanked out when the config file was being read * lib/options.h lib/rfc2068.c lib/rfc959.c lib/sshv2.c - mark the config variables that can show up in the bookmarks editor * src/text/gftp-text.c src/gtk/options_dialog.c - use gftp_set_global_option() to set the new configuration values * src/gtk/bookmarks.c - fixed crash in bookmarks dialog. Added notebook widget to the dialog as well. The options that can be edited for this site will show up in other tabs * src/gtk/gftp-gtk.c - fixes to the calls to gftp_set_global_option() * src/gtk/options_dialog.c - added gftp_gtk_setup_bookmark_options() to display all the editable options for this bookmark
author masneyb
date Mon, 21 Jul 2003 00:26:43 +0000
parents 007145d7d975
children b42e7233533a
line wrap: on
line diff
--- a/lib/protocols.c	Mon Jul 21 00:22:46 2003 +0000
+++ b/lib/protocols.c	Mon Jul 21 00:26:43 2003 +0000
@@ -2474,17 +2474,14 @@
 int
 gftp_fd_open (gftp_request * request, const char *pathname, int flags, mode_t mode)
 {
-  mode_t mask;
   int fd;
 
-  if (mode == 0 && (flags & O_CREAT))
-    {
-      mask = umask (0); /* FIXME - improve */
-      umask (mask);
-      mode = 0666 & ~mask;
-    }
-
-  if ((fd = open (pathname, flags, mode)) < 0)
+  if (mode == 0)
+    fd = open (pathname, flags);
+  else
+    fd = open (pathname, flags, mode);
+
+  if (fd < 0)
     {
       if (request != NULL)
         request->logging_function (gftp_logging_error, request,