Mercurial > gftp.yaz
diff src/uicommon/gftpui.c @ 499:39e9945288ea
2004-7-13 Brian Masney <masneyb@gftp.org>
* lib/gftp.h lib/local.c lib/misc.c lib/protocols.c lib/rfc2068.c
lib/rfc959.c lib/sshv2.c src/gtk/chmod_dialog.c src/gtk/delete_dialog.c
src/gtk/dnd.c src/gtk/gftp-gtk.c src/gtk/gtkui_transfer.c
src/gtk/menu-items.c src/gtk/misc-gtk.c src/gtk/view_dialog.c
src/text/textui.c src/uicommon/gftpui.c src/uicommon/gftpuicallbacks.c -
represent the file attributes as a mode_t variable instead of a
character string
author | masneyb |
---|---|
date | Tue, 13 Jul 2004 20:17:42 +0000 |
parents | 76c4e4cd108e |
children | 93d7d3b9a477 |
line wrap: on
line diff
--- a/src/uicommon/gftpui.c Tue Jul 13 02:44:35 2004 +0000 +++ b/src/uicommon/gftpui.c Tue Jul 13 20:17:42 2004 +0000 @@ -1159,7 +1159,7 @@ { tempfle = curfle->data; - if (tempfle->isdir) + if (S_ISDIR (tempfle->st_mode)) tdata->numdirs++; else tdata->numfiles++; @@ -1198,7 +1198,7 @@ for (curfle = files; curfle != NULL; curfle = curfle->next) { tempfle = curfle->data; - if (tempfle->isdir) + if (S_ISDIR (tempfle->st_mode)) tdata->numdirs++; else tdata->numfiles++; @@ -1258,9 +1258,9 @@ gftpui_common_transfer_files (gftp_transfer * tdata) { intptr_t preserve_permissions; - int i, mode, tofd, fromfd; struct timeval updatetime; ssize_t num_read, ret; + int i, tofd, fromfd; gftp_file * curfle; char buf[8192]; @@ -1299,7 +1299,7 @@ if (gftp_connect (tdata->fromreq) == 0 && gftp_connect (tdata->toreq) == 0) { - if (curfle->isdir) + if (S_ISDIR (curfle->st_mode)) { if (tdata->toreq->mkdir != NULL) { @@ -1446,12 +1446,8 @@ if (!curfle->is_fd && preserve_permissions) { - if (curfle->attribs) - { - mode = gftp_parse_attribs (curfle->attribs); - if (mode != 0) - gftp_chmod (tdata->toreq, curfle->destfile, mode); - } + if (curfle->st_mode != 0) + gftp_chmod (tdata->toreq, curfle->destfile, curfle->st_mode); if (curfle->datetime != 0) gftp_set_file_time (tdata->toreq, curfle->destfile,