Mercurial > gftp.yaz
diff src/uicommon/gftpui.c @ 858:10e2ce91e26c
2006-11-30 Brian Masney <masneyb@gftp.org>
* lib/rfc959.c lib/sshv2.c src/uicommon/gftpui.c - don't abort the
entire file transfer if there is a permission denied at some point
during the file transfer. Give the user an error at the very end if
there were any errors. (closes #328550)
author | masneyb |
---|---|
date | Fri, 01 Dec 2006 00:57:50 +0000 |
parents | 94f87e3c92b2 |
children | 885038cb945b |
line wrap: on
line diff
--- a/src/uicommon/gftpui.c Sun Nov 26 18:31:17 2006 +0000 +++ b/src/uicommon/gftpui.c Fri Dec 01 00:57:50 2006 +0000 @@ -1462,9 +1462,8 @@ static int _gftpui_common_trans_file_or_dir (gftp_transfer * tdata) { + int tofd, fromfd, ret; gftp_file * curfle; - int tofd, fromfd; - int ret; if (g_thread_supported ()) g_static_mutex_lock (&tdata->structmutex); @@ -1552,12 +1551,13 @@ int gftpui_common_transfer_files (gftp_transfer * tdata) { - int ret; + int ret, skipped_files; tdata->curfle = tdata->files; gettimeofday (&tdata->starttime, NULL); memcpy (&tdata->lasttime, &tdata->starttime, sizeof (tdata->lasttime)); + skipped_files = 0; while (tdata->curfle != NULL) { ret = _gftpui_common_trans_file_or_dir (tdata); @@ -1569,6 +1569,8 @@ if (gftp_abort_transfer (tdata->fromreq) != 0) gftp_disconnect (tdata->fromreq); } + else if (ret == GFTP_EFATAL) + skipped_files++; else if (ret < 0) { if (gftp_get_transfer_status (tdata, ret) == GFTP_ERETRYABLE) @@ -1590,6 +1592,11 @@ } } + if (skipped_files) + tdata->fromreq->logging_function (gftp_logging_error, tdata->fromreq, + _("There were %d files or directories that could not be transferred. Check the log for which items were not properly transferred."), + skipped_files); + tdata->done = 1; return (1); }