Mercurial > gftp.yaz
diff lib/protocols.c @ 578:6451504bed0b
2004-10-2 Brian Masney <masneyb@gftp.org>
* lib/protocols.c (gftp_parse_bookmark) - convert the local and remote
directories from UTF8 to the current locale specified in the
remote_charsets option
author | masneyb |
---|---|
date | Sat, 02 Oct 2004 12:59:49 +0000 |
parents | ce1e83470207 |
children | 5dc685bf403e |
line wrap: on
line diff
--- a/lib/protocols.c Fri Oct 01 13:31:12 2004 +0000 +++ b/lib/protocols.c Sat Oct 02 12:59:49 2004 +0000 @@ -613,7 +613,7 @@ { gftp_logging_func logging_function; gftp_bookmarks_var * tempentry; - char *default_protocol; + char *default_protocol, *utf8; int i, init_ret; g_return_val_if_fail (request != NULL, GFTP_EFATAL); @@ -648,13 +648,30 @@ gftp_set_account (request, tempentry->acct); gftp_set_hostname (request, tempentry->hostname); - gftp_set_directory (request, tempentry->remote_dir); + + utf8 = gftp_string_from_utf8 (request, tempentry->remote_dir); + if (utf8 != NULL) + { + gftp_set_directory (request, utf8); + g_free (utf8); + } + else + gftp_set_directory (request, tempentry->remote_dir); + gftp_set_port (request, tempentry->port); if (local_request != NULL && tempentry->local_dir != NULL && *tempentry->local_dir != '\0') { - gftp_set_directory (local_request, tempentry->local_dir); + utf8 = gftp_string_from_utf8 (request, tempentry->local_dir); + if (utf8 != NULL) + { + gftp_set_directory (local_request, utf8); + g_free (utf8); + } + else + gftp_set_directory (local_request, tempentry->local_dir); + if (refresh_local != NULL) *refresh_local = 1; }