# HG changeset patch # User masneyb # Date 1095468121 0 # Node ID 017b1108305b0cd0c4d9a1749eceac640201a743 # Parent 7f54d0c0edbc001e0fd0a6880ec9bc8da743c17e 2004-9-17 Brian Masney * src/gtk/transfer.c (check_done_process) - make sure the return code from the process is reported correctly to the user * docs/gftp-faq.sgml - added section about troubleshooting files not being uploaded * src/gtk/gtkui.c - fixed compiler warning diff -r 7f54d0c0edbc -r 017b1108305b ChangeLog --- a/ChangeLog Fri Sep 17 23:37:47 2004 +0000 +++ b/ChangeLog Sat Sep 18 00:42:01 2004 +0000 @@ -1,4 +1,12 @@ 2004-9-17 Brian Masney + * src/gtk/transfer.c (check_done_process) - make sure the return code + from the process is reported correctly to the user + + * docs/gftp-faq.sgml - added section about troubleshooting files not + being uploaded + + * src/gtk/gtkui.c - fixed compiler warning + * lib/misc.c lib/cache.c lib/config_file.c lib/gftp.h lib/protocols.c lib/rfc2068.c lib/sshv2.c src/gtk/bookmarks.c src/gtk/dnd.c src/gtk/gftp-gtk.c src/gtk/gtkui.c src/gtk/menu-items.c @@ -2829,7 +2837,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.322 2004/09/17 23:37:46 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.323 2004/09/18 00:42:01 masneyb Exp $ tags * debian/* - updated files from Debian maintainer diff -r 7f54d0c0edbc -r 017b1108305b docs/gftp-faq.sgml --- a/docs/gftp-faq.sgml Fri Sep 17 23:37:47 2004 +0000 +++ b/docs/gftp-faq.sgml Sat Sep 18 00:42:01 2004 +0000 @@ -6,7 +6,7 @@ - $Date: 2004/09/14 10:24:01 $ + $Date: 2004/09/18 00:42:01 $ gFTP FAQ @@ -278,6 +278,20 @@ + +When using an external editor, gFTP does not detect changes that are being made to the file. + + +Look at the man page for the editor you are using and see if there is a +command line argument to have the editor run in the foreground (it won't +fork to detact from the current terminal). If you are using one of the +graphical VIM editors, you can add the --nofork argument. + + + + + + diff -r 7f54d0c0edbc -r 017b1108305b src/gtk/gtkui.c --- a/src/gtk/gtkui.c Fri Sep 17 23:37:47 2004 +0000 +++ b/src/gtk/gtkui.c Sat Sep 18 00:42:01 2004 +0000 @@ -385,10 +385,10 @@ char *tempstr; int ret; + wdata = uidata; if ((tempstr = gftp_expand_path (wdata->request, directory)) == NULL) return (FALSE); - wdata = uidata; cdata = g_malloc0 (sizeof (*cdata)); cdata->request = wdata->request; cdata->uidata = wdata; diff -r 7f54d0c0edbc -r 017b1108305b src/gtk/transfer.c --- a/src/gtk/transfer.c Fri Sep 17 23:37:47 2004 +0000 +++ b/src/gtk/transfer.c Sat Sep 18 00:42:01 2004 +0000 @@ -324,8 +324,8 @@ { gftp_viewedit_data * ve_proc; GList * curdata, *deldata; + int ret, procret; struct stat st; - int ret; char *str; pid_t pid; @@ -342,17 +342,27 @@ { viewedit_processes = g_list_remove_link (viewedit_processes, deldata); - if (ret != 0) - ftp_log (gftp_logging_error, NULL, - _("Error: Child %d returned %d\n"), pid, ret); - else - ftp_log (gftp_logging_misc, NULL, - _("Child %d returned successfully\n"), pid); + if (WIFEXITED (ret)) + { + procret = WEXITSTATUS (ret); + if (procret != 0) + ftp_log (gftp_logging_error, NULL, + _("Error: Child %d returned %d\n"), pid, procret); + else + ftp_log (gftp_logging_misc, NULL, + _("Child %d returned successfully\n"), pid); + } + else + ftp_log (gftp_logging_error, NULL, + _("Error: Child %d did not terminate properly\n"), + pid); if (!ve_proc->view && !ve_proc->dontupload) { /* We was editing the file. Upload it */ - if (stat (ve_proc->filename, &st) == -1) + ret = stat (ve_proc->filename, &st); + + if (ret == -1) ftp_log (gftp_logging_error, NULL, _("Error: Cannot get information about file %s: %s\n"), ve_proc->filename, g_strerror (errno));