# HG changeset patch # User masneyb # Date 1036109408 0 # Node ID 3da7765bc4399e686ee1939208febde19fde785d # Parent 311e29c40ed696008a9cb2a1c9db8f688f42143b 2002-10-31 Brian Masney * lib/protocols.c (gftp_get_next_file) - don't use g_filename_to_utf8. If g_locale_to_utf8 fails, print out a warning to the user on the console diff -r 311e29c40ed6 -r 3da7765bc439 ChangeLog --- a/ChangeLog Thu Oct 31 23:55:17 2002 +0000 +++ b/ChangeLog Fri Nov 01 00:10:08 2002 +0000 @@ -1,3 +1,8 @@ +2002-10-31 Brian Masney + * lib/protocols.c (gftp_get_next_file) - don't use g_filename_to_utf8. + If g_locale_to_utf8 fails, print out a warning to the user on the + console + 2002-10-31 Brian Masney * src/gtk/*.[ch] - don't check for gtk+ version based on the minor version. May cause problems later on. @@ -122,7 +127,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.24 2002/10/31 23:55:15 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.25 2002/11/01 00:10:08 masneyb Exp $ tags * debian/* - updated files from Debian maintainer diff -r 311e29c40ed6 -r 3da7765bc439 lib/protocols.c --- a/lib/protocols.c Thu Oct 31 23:55:17 2002 +0000 +++ b/lib/protocols.c Fri Nov 01 00:10:08 2002 +0000 @@ -462,6 +462,7 @@ #if GLIB_MAJOR_VERSION > 1 gsize bread, bwrite; char *tempstr; + GError * error; #endif g_return_val_if_fail (request != NULL, -2); @@ -483,19 +484,16 @@ #if GLIB_MAJOR_VERSION > 1 if (fle->file != NULL && !g_utf8_validate (fle->file, -1, NULL)) { + error = NULL; if ((tempstr = g_locale_to_utf8 (fle->file, -1, &bread, - &bwrite, NULL)) != NULL) + &bwrite, &error)) != NULL) { g_free (fle->file); fle->file = tempstr; } - else if ((tempstr = g_filename_to_utf8 (fle->file, -1, &bread, - &bwrite, NULL)) != NULL) - { - g_free (fle->file); - fle->file = tempstr; - } - + else + g_warning ("Error when converting %s to UTF-8: %s\n", fle->file, + error->message); } #endif