aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--linden/indra/newview/llfilepicker.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/linden/indra/newview/llfilepicker.cpp b/linden/indra/newview/llfilepicker.cpp
index ece30dd..dbb218a 100644
--- a/linden/indra/newview/llfilepicker.cpp
+++ b/linden/indra/newview/llfilepicker.cpp
@@ -917,8 +917,9 @@ void LLFilePicker::add_to_selectedfiles(gpointer data, gpointer user_data)
917 917
918 LLFilePicker* picker = (LLFilePicker*) user_data; 918 LLFilePicker* picker = (LLFilePicker*) user_data;
919 GError *error = NULL; 919 GError *error = NULL;
920 gchar* filename_utf8 = g_filename_to_utf8((gchar*)data, 920// gchar* filename_utf8 = g_filename_to_utf8((gchar*)data,
921 -1, NULL, NULL, &error); 921// -1, NULL, NULL, &error);
922 gchar* filename_utf8 = g_filename_display_name ((gchar*) data);
922 if (error) 923 if (error)
923 { 924 {
924 // This condition should really be notified to the user, e.g., 925 // This condition should really be notified to the user, e.g.,
@@ -930,12 +931,10 @@ void LLFilePicker::add_to_selectedfiles(gpointer data, gpointer user_data)
930 // writing is 2.22. *sigh*) LL supplied *makeASCII family are 931 // writing is 2.22. *sigh*) LL supplied *makeASCII family are
931 // also unsuitable since they allow control characters... 932 // also unsuitable since they allow control characters...
932 933
933 std::string display_name; 934 // muhahaha ... Imprudence can !
934 for (const gchar *str = (const gchar *)data; *str; str++) 935
935 { 936
936 display_name += (char)((*str >= 0x20 && *str <= 0x7E) ? *str : '?'); 937 llwarns << "g_filename_display_name failed on" << filename_utf8 << ": "<< error->message << llendl;
937 }
938 llwarns << "g_filename_to_utf8 failed on \"" << display_name << "\": " << error->message << llendl;
939 } 938 }
940 939
941 if (filename_utf8) 940 if (filename_utf8)