changeset 855:30eaf54a63f7

2006-11-16 Brian Masney <masneyb@gftp.org> * lib/protocols.c (gftp_get_all_subdirs) - don't return if there was a problem running gftp_stat_filename(). Only return if there was a fatal error. (closes #314929)
author masneyb
date Fri, 17 Nov 2006 03:04:57 +0000
parents 2c94567f9a53
children 7a92c45e57ec
files ChangeLog lib/protocols.c
diffstat 2 files changed, 15 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Nov 17 02:50:34 2006 +0000
+++ b/ChangeLog	Fri Nov 17 03:04:57 2006 +0000
@@ -1,4 +1,8 @@
 2006-11-16 Brian Masney <masneyb@gftp.org>
+	* lib/protocols.c (gftp_get_all_subdirs) - don't return if there was a
+	problem running gftp_stat_filename(). Only return if there was a fatal
+	error. (closes #314929)
+
 	* lib/config_file.c (write_comment) - added patch that fixes writing
 	the comments to the config file. In some cases, an extra # was placed
 	at the beginning of a line. It could cause some settings to be not 
@@ -3735,7 +3739,7 @@
 
 	* cvsclean - added this script
 
-	* *.[ch] - added $Id: ChangeLog,v 1.503 2006/11/17 02:50:32 masneyb Exp $ tags
+	* *.[ch] - added $Id: ChangeLog,v 1.504 2006/11/17 03:04:50 masneyb Exp $ tags
 
 	* debian/* - updated files from Debian maintainer
 
--- a/lib/protocols.c	Fri Nov 17 02:50:34 2006 +0000
+++ b/lib/protocols.c	Fri Nov 17 03:04:57 2006 +0000
@@ -2171,16 +2171,19 @@
           linksize = 0;
           ret = gftp_stat_filename (transfer->fromreq, curfle->file, &st_mode,
                                     &linksize);
-          if (ret < 0)
+          if (ret == GFTP_EFATAL)
             {
               _cleanup_get_all_subdirs (transfer, oldfromdir, oldtodir,
                                         update_func);
               return (ret);
             }
-          else if (S_ISDIR (st_mode))
-            curfle->st_mode = st_mode;
-          else
-            curfle->size = linksize;
+          else if (ret == 0)
+            {
+              if (S_ISDIR (st_mode))
+                curfle->st_mode = st_mode;
+              else
+                curfle->size = linksize;
+            }
         }
 
       if (!S_ISDIR (curfle->st_mode))
@@ -2255,7 +2258,7 @@
   if (oldfromdir != NULL)
     {
       ret = gftp_set_directory (transfer->fromreq, oldfromdir);
-      if (ret < 0)
+      if (ret == GFTP_EFATAL)
         {
           _cleanup_get_all_subdirs (transfer, oldfromdir, oldtodir,
                                     update_func);
@@ -2266,7 +2269,7 @@
   if (oldtodir != NULL)
     {
       ret = gftp_set_directory (transfer->toreq, oldtodir);
-      if (ret < 0)
+      if (ret == GFTP_EFATAL)
         {
           _cleanup_get_all_subdirs (transfer, oldfromdir, oldtodir,
                                     update_func);