comparison lib/sshv2.c @ 555:7f54d0c0edbc

2004-9-17 Brian Masney <masneyb@gftp.org> * 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 src/gtk/misc-gtk.c src/gtk/transfer.c src/uicommon/gftpui.c - added gftp_request argument to gftp_build_path() and expand_path(). Renamed expand_path() to gftp_expand_path() * lib/gftp.h - fixed compile error in gftp_need_username macro
author masneyb
date Fri, 17 Sep 2004 23:37:47 +0000
parents b2b4f5fa8fc7
children de0128b73daa
comparison
equal deleted inserted replaced
554:a8ca3e349d4a 555:7f54d0c0edbc
181 ret = sshv2_initialize_string (request, *len); 181 ret = sshv2_initialize_string (request, *len);
182 sshv2_add_string_to_buf (ret + 4, path); 182 sshv2_add_string_to_buf (ret + 4, path);
183 } 183 }
184 else 184 else
185 { 185 {
186 tempstr = gftp_build_path (request->directory, path, NULL); 186 tempstr = gftp_build_path (request, request->directory, path, NULL);
187 pathlen = strlen (tempstr); 187 pathlen = strlen (tempstr);
188 *len += pathlen + 8; 188 *len += pathlen + 8;
189 ret = sshv2_initialize_string (request, *len); 189 ret = sshv2_initialize_string (request, *len);
190 sshv2_add_string_to_buf (ret + 4, tempstr); 190 sshv2_add_string_to_buf (ret + 4, tempstr);
191 g_free (tempstr); 191 g_free (tempstr);
1584 g_return_val_if_fail (newname != NULL, GFTP_EFATAL); 1584 g_return_val_if_fail (newname != NULL, GFTP_EFATAL);
1585 1585
1586 if (*oldname == '/') 1586 if (*oldname == '/')
1587 oldstr = g_strdup (oldname); 1587 oldstr = g_strdup (oldname);
1588 else 1588 else
1589 oldstr = gftp_build_path (request->directory, oldname, NULL); 1589 oldstr = gftp_build_path (request, request->directory, oldname, NULL);
1590 1590
1591 if (*newname == '/') 1591 if (*newname == '/')
1592 newstr = g_strdup (newname); 1592 newstr = g_strdup (newname);
1593 else 1593 else
1594 newstr = gftp_build_path (request->directory, newname, NULL); 1594 newstr = gftp_build_path (request, request->directory, newname, NULL);
1595 1595
1596 oldlen = strlen (oldstr); 1596 oldlen = strlen (oldstr);
1597 newlen = strlen (newname); 1597 newlen = strlen (newname);
1598 1598
1599 len = oldlen + newlen + 12; 1599 len = oldlen + newlen + 12;