mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
[FileBrowser] if text cannot be converted, try to mangle it into something.
Issue: #1471
This commit is contained in:
parent
e116aa5bc1
commit
e081feec27
1 changed files with 2 additions and 4 deletions
|
@ -250,8 +250,7 @@ static void get_file_browser(Mode *sw) {
|
|||
pd->array[pd->array_length].name =
|
||||
g_filename_to_utf8(rd->d_name, -1, NULL, NULL, NULL);
|
||||
if (pd->array[pd->array_length].name == NULL) {
|
||||
pd->array[pd->array_length].name =
|
||||
g_strdup("Invalid UTF-8 filename.");
|
||||
pd->array[pd->array_length].name = rofi_force_utf8(rd->d_name, -1);
|
||||
}
|
||||
pd->array[pd->array_length].path =
|
||||
g_build_filename(cdir, rd->d_name, NULL);
|
||||
|
@ -273,8 +272,7 @@ static void get_file_browser(Mode *sw) {
|
|||
pd->array[pd->array_length].name =
|
||||
g_filename_to_utf8(rd->d_name, -1, NULL, NULL, NULL);
|
||||
if (pd->array[pd->array_length].name == NULL) {
|
||||
pd->array[pd->array_length].name =
|
||||
g_strdup("Invalid UTF-8 filename.");
|
||||
pd->array[pd->array_length].name = rofi_force_utf8(rd->d_name, -1);
|
||||
}
|
||||
pd->array[pd->array_length].path =
|
||||
g_build_filename(cdir, rd->d_name, NULL);
|
||||
|
|
Loading…
Reference in a new issue