Mercurial > gftp.yaz
diff lib/protocols.c @ 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 | b282e346bd25 |
children | afbe37351940 |
line wrap: on
line diff
--- 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); }