changeset 826:92ba2b1e144a

2006-10-15 Brian Masney <masneyb@gftp.org> * lib/protocols.c (gftp_get_all_subdirs) - use S_ISDIR macro instead of checking the bitmask against S_IFDIR.
author masneyb
date Sun, 15 Oct 2006 16:25:01 +0000
parents 73e9842e7097
children 251682017c97
files ChangeLog lib/protocols.c
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Oct 15 16:16:58 2006 +0000
+++ b/ChangeLog	Sun Oct 15 16:25:01 2006 +0000
@@ -1,4 +1,7 @@
 2006-10-15 Brian Masney <masneyb@gftp.org>
+	* lib/protocols.c (gftp_get_all_subdirs) - use S_ISDIR macro instead of
+	checking the bitmask against S_IFDIR. 
+
 	* src/uicommon/gftpui.c - split the code that transfers files into
 	smaller functions.
 
@@ -3613,7 +3616,7 @@
 
 	* cvsclean - added this script
 
-	* *.[ch] - added $Id: ChangeLog,v 1.480 2006/10/15 16:16:52 masneyb Exp $ tags
+	* *.[ch] - added $Id: ChangeLog,v 1.481 2006/10/15 16:25:00 masneyb Exp $ tags
 
 	* debian/* - updated files from Debian maintainer
 
--- a/lib/protocols.c	Sun Oct 15 16:16:58 2006 +0000
+++ b/lib/protocols.c	Sun Oct 15 16:25:01 2006 +0000
@@ -2126,13 +2126,15 @@
             curfle->size = linksize;
         }
 
-      if (!(curfle->st_mode & S_IFDIR))
+      if (!S_ISDIR (curfle->st_mode))
         {
           transfer->numfiles++;
           continue;
         }
 
       /* Got a directory... */
+      transfer->numdirs++;
+
       if (oldfromdir == NULL)
         oldfromdir = g_strdup (transfer->fromreq->directory);
 
@@ -2184,7 +2186,6 @@
           for (; lastlist->next != NULL; lastlist = lastlist->next);
         }
 
-      transfer->numdirs++;
       if (update_func != NULL)
         update_func (transfer);
     }