# HG changeset patch # User masneyb # Date 1060201894 0 # Node ID f41650dc896c8074ca1e44b5180438b2857d1c98 # Parent 290d00853950ad13773b1b3e075050c5e7ee46eb 2003-8-6 Brian Masney * lib/misc.c (gftp_build_path) - fixed initial path beginning with //. (expand_path) - when the path is empty at the end, set it to /. This would happen for directories like /etc/.. diff -r 290d00853950 -r f41650dc896c ChangeLog --- a/ChangeLog Tue Aug 05 01:54:03 2003 +0000 +++ b/ChangeLog Wed Aug 06 20:31:34 2003 +0000 @@ -1,3 +1,8 @@ +2003-8-6 Brian Masney + * lib/misc.c (gftp_build_path) - fixed initial path beginning with //. + (expand_path) - when the path is empty at the end, set it to /. This + would happen for directories like /etc/.. + 2003-8-4 Brian Masney * src/gtk/transfer.c (update_file_status) - fix possible division by 0 @@ -1433,7 +1438,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.127 2003/08/05 01:54:02 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.128 2003/08/06 20:31:30 masneyb Exp $ tags * debian/* - updated files from Debian maintainer diff -r 290d00853950 -r f41650dc896c lib/misc.c --- a/lib/misc.c Tue Aug 05 01:54:03 2003 +0000 +++ b/lib/misc.c Wed Aug 06 20:31:34 2003 +0000 @@ -195,7 +195,7 @@ if (newstr != NULL) g_free (newstr); - newstr = g_malloc0 (1); + newstr = g_strdup ("/"); } g_free (str); @@ -205,7 +205,7 @@ if ((pos = strchr (newstr, '/')) == NULL) str = g_strdup (pw->pw_dir); else - str = g_strconcat (pw->pw_dir, pos, NULL); + str = gftp_build_path (pw->pw_dir, pos, NULL); g_free (newstr); newstr = str; @@ -1203,11 +1203,11 @@ g_return_val_if_fail (first_element != NULL, NULL); - ret = g_malloc0 (1); - retlen = 0; + ret = g_strdup (first_element); + retlen = strlen (ret); va_start (args, first_element); - for (element = first_element; + for (element = va_arg (args, char *); element != NULL; element = va_arg (args, char *)) {