Mercurial > gftp.yaz
changeset 607:f946521bb2f2
2004-11-1 Brian Masney <masneyb@gftp.org>
* 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
author | masneyb |
---|---|
date | Tue, 02 Nov 2004 02:15:14 +0000 |
parents | b6887fbe3e11 |
children | 7e575601841a |
files | ChangeLog lib/config_file.c |
diffstat | 2 files changed, 35 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- 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 <masneyb@gftp.org> + * 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
--- 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; i<tempentry->num_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; i<tempentry->num_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); + } } }