# HG changeset patch # User masneyb # Date 1160929501 0 # Node ID 92ba2b1e144a9fae8cbbb8008e22929ad14de7f7 # Parent 73e9842e70977e04717c8bc159db9f4dc193bf2b 2006-10-15 Brian Masney * lib/protocols.c (gftp_get_all_subdirs) - use S_ISDIR macro instead of checking the bitmask against S_IFDIR. diff -r 73e9842e7097 -r 92ba2b1e144a ChangeLog --- 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 + * 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 diff -r 73e9842e7097 -r 92ba2b1e144a lib/protocols.c --- 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); }