changeset 255:2ad324cf4930

2003-8-11 Brian Masney <masneyb@gftp.org> * lib/local.c (local_get_next_file) - fix for directories that are symlinks * src/gtk/*.[ch] - updated copyright dates to 2003 on all of the files
author masneyb
date Tue, 12 Aug 2003 01:05:02 +0000
parents b0c531678919
children 04f462c2ff98
files ChangeLog lib/local.c src/gtk/bookmarks.c src/gtk/chmod_dialog.c src/gtk/delete_dialog.c src/gtk/dnd.c src/gtk/gftp-gtk.c src/gtk/gftp-gtk.h src/gtk/menu-items.c src/gtk/misc-gtk.c src/gtk/mkdir_dialog.c src/gtk/options_dialog.c src/gtk/rename_dialog.c src/gtk/transfer.c src/gtk/view_dialog.c
diffstat 15 files changed, 33 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Aug 12 00:38:06 2003 +0000
+++ b/ChangeLog	Tue Aug 12 01:05:02 2003 +0000
@@ -1,4 +1,9 @@
 2003-8-11 Brian Masney <masneyb@gftp.org>
+	* lib/local.c (local_get_next_file) - fix for directories that are 
+	symlinks
+
+	* src/gtk/*.[ch] - updated copyright dates to 2003 on all of the files
+
 	* src/gtk/menu-items.c lib/rfc959.c - fix for selecting ASCII/Binary 
 	transfers
 
@@ -1469,7 +1474,7 @@
 
 	* cvsclean - added this script
 
-	* *.[ch] - added $Id: ChangeLog,v 1.133 2003/08/12 00:38:03 masneyb Exp $ tags
+	* *.[ch] - added $Id: ChangeLog,v 1.134 2003/08/12 01:05:01 masneyb Exp $ tags
 
 	* debian/* - updated files from Debian maintainer
 
--- a/lib/local.c	Tue Aug 12 00:38:06 2003 +0000
+++ b/lib/local.c	Tue Aug 12 01:05:02 2003 +0000
@@ -292,11 +292,11 @@
 local_get_next_file (gftp_request * request, gftp_file * fle, int fd)
 {
   local_protocol_data * lpd;
+  struct stat st, fst;
   struct dirent *dirp;
   char *user, *group;
   struct passwd *pw;
   struct group *gr;
-  struct stat st;
 
   /* the struct passwd and struct group are not thread safe. But,
      we're ok here because I have threading turned off for the local
@@ -326,6 +326,13 @@
       return (GFTP_ERETRYABLE);
     }
 
+  if (stat (fle->file, &fst) != 0)
+    {
+      closedir (lpd->dir);
+      lpd->dir = NULL;
+      return (GFTP_ERETRYABLE);
+    }
+
   if ((user = g_hash_table_lookup (lpd->userhash, 
                                    GUINT_TO_POINTER(st.st_uid))) != NULL)
     fle->user = g_strdup (user);
@@ -363,11 +370,11 @@
   else
     fle->size = st.st_size;
 
-  fle->isdir = S_ISDIR (st.st_mode);
+  fle->isdir = S_ISDIR (fst.st_mode);
   fle->islink = S_ISLNK (st.st_mode);
-  fle->isexe = (st.st_mode & S_IXUSR) || 
-               (st.st_mode & S_IXGRP) ||
-               (st.st_mode & S_IXOTH);
+  fle->isexe = (fst.st_mode & S_IXUSR) || 
+               (fst.st_mode & S_IXGRP) ||
+               (fst.st_mode & S_IXOTH);
 
   return (1);
 }
--- a/src/gtk/bookmarks.c	Tue Aug 12 00:38:06 2003 +0000
+++ b/src/gtk/bookmarks.c	Tue Aug 12 01:05:02 2003 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************/
 /*  bookmarks.c - routines for the bookmarks                                 */
-/*  Copyright (C) 1998-2002 Brian Masney <masneyb@gftp.org>                  */
+/*  Copyright (C) 1998-2003 Brian Masney <masneyb@gftp.org>                  */
 /*                                                                           */
 /*  This program is free software; you can redistribute it and/or modify     */
 /*  it under the terms of the GNU General Public License as published by     */
--- a/src/gtk/chmod_dialog.c	Tue Aug 12 00:38:06 2003 +0000
+++ b/src/gtk/chmod_dialog.c	Tue Aug 12 01:05:02 2003 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************/
 /*  chmod_dialog.c - the chmod dialog box                                    */
-/*  Copyright (C) 1998-2002 Brian Masney <masneyb@gftp.org>                  */
+/*  Copyright (C) 1998-2003 Brian Masney <masneyb@gftp.org>                  */
 /*                                                                           */
 /*  This program is free software; you can redistribute it and/or modify     */
 /*  it under the terms of the GNU General Public License as published by     */
--- a/src/gtk/delete_dialog.c	Tue Aug 12 00:38:06 2003 +0000
+++ b/src/gtk/delete_dialog.c	Tue Aug 12 01:05:02 2003 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************/
 /*  delete_dialog.c - the delete dialog                                      */
-/*  Copyright (C) 1998-2002 Brian Masney <masneyb@gftp.org>                  */
+/*  Copyright (C) 1998-2003 Brian Masney <masneyb@gftp.org>                  */
 /*                                                                           */
 /*  This program is free software; you can redistribute it and/or modify     */
 /*  it under the terms of the GNU General Public License as published by     */
--- a/src/gtk/dnd.c	Tue Aug 12 00:38:06 2003 +0000
+++ b/src/gtk/dnd.c	Tue Aug 12 01:05:02 2003 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************/
 /*  dnd.c - drag and drop functions                                          */
-/*  Copyright (C) 1998-2002 Brian Masney <masneyb@gftp.org>                  */
+/*  Copyright (C) 1998-2003 Brian Masney <masneyb@gftp.org>                  */
 /*                                                                           */
 /*  This program is free software; you can redistribute it and/or modify     */
 /*  it under the terms of the GNU General Public License as published by     */
--- a/src/gtk/gftp-gtk.c	Tue Aug 12 00:38:06 2003 +0000
+++ b/src/gtk/gftp-gtk.c	Tue Aug 12 01:05:02 2003 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************/
 /*  gftp-gtk.c - GTK+ 1.2 port of gftp                                       */
-/*  Copyright (C) 1998-2002 Brian Masney <masneyb@gftp.org>                  */
+/*  Copyright (C) 1998-2003 Brian Masney <masneyb@gftp.org>                  */
 /*                                                                           */
 /*  This program is free software; you can redistribute it and/or modify     */
 /*  it under the terms of the GNU General Public License as published by     */
@@ -1164,7 +1164,7 @@
   gtk_widget_show (window);
 
   ftp_log (gftp_logging_misc, NULL,
-	   "%s, Copyright (C) 1998-2002 Brian Masney <", gftp_version);
+	   "%s, Copyright (C) 1998-2003 Brian Masney <", gftp_version);
   ftp_log (gftp_logging_recv, NULL, "masneyb@gftp.org");
   ftp_log (gftp_logging_misc, NULL,
 	   _(">. If you have any questions, comments, or suggestions about this program, please feel free to email them to me. You can always find out the latest news about gFTP from my website at http://www.gftp.org/\n"));
--- a/src/gtk/gftp-gtk.h	Tue Aug 12 00:38:06 2003 +0000
+++ b/src/gtk/gftp-gtk.h	Tue Aug 12 01:05:02 2003 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************/
 /*  gftp-gtk.h - include file for the gftp gtk+ 1.2 port                     */
-/*  Copyright (C) 1998-2002 Brian Masney <masneyb@gftp.org>                  */
+/*  Copyright (C) 1998-2003 Brian Masney <masneyb@gftp.org>                  */
 /*                                                                           */
 /*  This program is free software; you can redistribute it and/or modify     */
 /*  it under the terms of the GNU General Public License as published by     */
--- a/src/gtk/menu-items.c	Tue Aug 12 00:38:06 2003 +0000
+++ b/src/gtk/menu-items.c	Tue Aug 12 01:05:02 2003 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************/
 /*  menu-items.c - menu callbacks                                            */
-/*  Copyright (C) 1998-2002 Brian Masney <masneyb@gftp.org>                  */
+/*  Copyright (C) 1998-2003 Brian Masney <masneyb@gftp.org>                  */
 /*                                                                           */
 /*  This program is free software; you can redistribute it and/or modify     */
 /*  it under the terms of the GNU General Public License as published by     */
@@ -770,7 +770,7 @@
   gtk_box_pack_start (GTK_BOX (box), tempwid, FALSE, FALSE, 0);
   gtk_widget_show (tempwid);
 
-  tempstr = g_strdup_printf (_("%s\nCopyright (C) 1998-2002 Brian Masney <masneyb@gftp.org>\nOfficial Homepage: http://www.gftp.org/\nLogo by: Aaron Worley <planet_hoth@yahoo.com>\n"), gftp_version);
+  tempstr = g_strdup_printf (_("%s\nCopyright (C) 1998-2003 Brian Masney <masneyb@gftp.org>\nOfficial Homepage: http://www.gftp.org/\nLogo by: Aaron Worley <planet_hoth@yahoo.com>\n"), gftp_version);
   str = _("Translated by");
   if (strcmp (str, "Translated by") != 0)
     {
--- a/src/gtk/misc-gtk.c	Tue Aug 12 00:38:06 2003 +0000
+++ b/src/gtk/misc-gtk.c	Tue Aug 12 01:05:02 2003 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************/
 /*  misc-gtk.c - misc stuff for the gtk+ 1.2 port of gftp                    */
-/*  Copyright (C) 1998-2002 Brian Masney <masneyb@gftp.org>                  */
+/*  Copyright (C) 1998-2003 Brian Masney <masneyb@gftp.org>                  */
 /*                                                                           */
 /*  This program is free software; you can redistribute it and/or modify     */
 /*  it under the terms of the GNU General Public License as published by     */
--- a/src/gtk/mkdir_dialog.c	Tue Aug 12 00:38:06 2003 +0000
+++ b/src/gtk/mkdir_dialog.c	Tue Aug 12 01:05:02 2003 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************/
 /*  mkdir_dialog.c - make directory dialog box and ftp routines              */
-/*  Copyright (C) 1998-2002 Brian Masney <masneyb@gftp.org>                  */
+/*  Copyright (C) 1998-2003 Brian Masney <masneyb@gftp.org>                  */
 /*                                                                           */
 /*  This program is free software; you can redistribute it and/or modify     */
 /*  it under the terms of the GNU General Public License as published by     */
--- a/src/gtk/options_dialog.c	Tue Aug 12 00:38:06 2003 +0000
+++ b/src/gtk/options_dialog.c	Tue Aug 12 01:05:02 2003 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************/
 /*  menu-items.c - menu callbacks                                            */
-/*  Copyright (C) 1998-2002 Brian Masney <masneyb@gftp.org>                  */
+/*  Copyright (C) 1998-2003 Brian Masney <masneyb@gftp.org>                  */
 /*                                                                           */
 /*  This program is free software; you can redistribute it and/or modify     */
 /*  it under the terms of the GNU General Public License as published by     */
--- a/src/gtk/rename_dialog.c	Tue Aug 12 00:38:06 2003 +0000
+++ b/src/gtk/rename_dialog.c	Tue Aug 12 01:05:02 2003 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************/
 /*  rename_dialog.c - rename dialog box and ftp routines                     */
-/*  Copyright (C) 1998-2002 Brian Masney <masneyb@gftp.org>                  */
+/*  Copyright (C) 1998-2003 Brian Masney <masneyb@gftp.org>                  */
 /*                                                                           */
 /*  This program is free software; you can redistribute it and/or modify     */
 /*  it under the terms of the GNU General Public License as published by     */
--- a/src/gtk/transfer.c	Tue Aug 12 00:38:06 2003 +0000
+++ b/src/gtk/transfer.c	Tue Aug 12 01:05:02 2003 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************/
 /*  transfer.c - functions to handle transfering files                       */
-/*  Copyright (C) 1998-2002 Brian Masney <masneyb@gftp.org>                  */
+/*  Copyright (C) 1998-2003 Brian Masney <masneyb@gftp.org>                  */
 /*                                                                           */
 /*  This program is free software; you can redistribute it and/or modify     */
 /*  it under the terms of the GNU General Public License as published by     */
--- a/src/gtk/view_dialog.c	Tue Aug 12 00:38:06 2003 +0000
+++ b/src/gtk/view_dialog.c	Tue Aug 12 01:05:02 2003 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************/
 /*  view_dialog.c - view dialog box and ftp routines                         */
-/*  Copyright (C) 1998-2002 Brian Masney <masneyb@gftp.org>                  */
+/*  Copyright (C) 1998-2003 Brian Masney <masneyb@gftp.org>                  */
 /*                                                                           */
 /*  This program is free software; you can redistribute it and/or modify     */
 /*  it under the terms of the GNU General Public License as published by     */