# HG changeset patch # User masneyb # Date 1099361714 0 # Node ID f946521bb2f25e4e861cc3a2e2cdc50c5943af6a # Parent b6887fbe3e11fc08de4c066061831695fbdfaa6f 2004-11-1 Brian Masney * lib/config_file.c (gftp_write_bookmarks_file) - if a folder has no children, make sure the entry has a / appended to the end of the description. Don't write out any of the other unneeded fields diff -r b6887fbe3e11 -r f946521bb2f2 ChangeLog --- a/ChangeLog Tue Nov 02 01:59:23 2004 +0000 +++ b/ChangeLog Tue Nov 02 02:15:14 2004 +0000 @@ -1,4 +1,8 @@ 2004-11-1 Brian Masney + * lib/config_file.c (gftp_write_bookmarks_file) - if a folder has no + children, make sure the entry has a / appended to the end of the + description. Don't write out any of the other unneeded fields + * src/gtk/bookmarks.c (build_bookmarks_tree) - fixes for adding toplevel folders that are empty @@ -3002,7 +3006,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.356 2004/11/02 01:59:23 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.357 2004/11/02 02:15:14 masneyb Exp $ tags * debian/* - updated files from Debian maintainer diff -r b6887fbe3e11 -r f946521bb2f2 lib/config_file.c --- a/lib/config_file.c Tue Nov 02 01:59:23 2004 +0000 +++ b/lib/config_file.c Tue Nov 02 02:15:14 2004 +0000 @@ -764,34 +764,40 @@ while (*tempstr == '/') tempstr++; - if (tempentry->save_password && tempentry->pass != NULL) - password = gftp_scramble_password (tempentry->pass); + if (tempentry->isfolder) + { + fprintf (bmfile, "[%s/]\n", tempstr); + } else - password = NULL; + { + if (tempentry->save_password && tempentry->pass != NULL) + password = gftp_scramble_password (tempentry->pass); + else + password = NULL; - fprintf (bmfile, - "[%s]\nhostname=%s\nport=%d\nprotocol=%s\nremote directory=%s\nlocal directory=%s\nusername=%s\npassword=%s\naccount=%s\n", - tempstr, tempentry->hostname == NULL ? "" : tempentry->hostname, - tempentry->port, tempentry->protocol == NULL - || *tempentry->protocol == - '\0' ? gftp_protocols[0].name : tempentry->protocol, - tempentry->remote_dir == NULL ? "" : tempentry->remote_dir, - tempentry->local_dir == NULL ? "" : tempentry->local_dir, - tempentry->user == NULL ? "" : tempentry->user, - password == NULL ? "" : password, - tempentry->acct == NULL ? "" : tempentry->acct); + fprintf (bmfile, + "[%s]\nhostname=%s\nport=%d\nprotocol=%s\nremote directory=%s\nlocal directory=%s\nusername=%s\npassword=%s\naccount=%s\n", + tempstr, tempentry->hostname == NULL ? "" : tempentry->hostname, + tempentry->port, tempentry->protocol == NULL + || *tempentry->protocol == + '\0' ? gftp_protocols[0].name : tempentry->protocol, + tempentry->remote_dir == NULL ? "" : tempentry->remote_dir, + tempentry->local_dir == NULL ? "" : tempentry->local_dir, + tempentry->user == NULL ? "" : tempentry->user, + password == NULL ? "" : password, + tempentry->acct == NULL ? "" : tempentry->acct); + if (password != NULL) + g_free(password); - if (password != NULL) - g_free(password); - - if (tempentry->local_options_vars != NULL) - { - for (i=0; inum_local_options_vars; i++) + if (tempentry->local_options_vars != NULL) { - gftp_option_types[tempentry->local_options_vars[i].otype].write_function (&tempentry->local_options_vars[i], buf, sizeof (buf), 1); - - fprintf (bmfile, "%s=%s\n", tempentry->local_options_vars[i].key, - buf); + for (i=0; inum_local_options_vars; i++) + { + gftp_option_types[tempentry->local_options_vars[i].otype].write_function (&tempentry->local_options_vars[i], buf, sizeof (buf), 1); + + fprintf (bmfile, "%s=%s\n", tempentry->local_options_vars[i].key, + buf); + } } }