[FileBrowser] fix escaping of paths.

This commit is contained in:
Dave Davenport 2021-05-10 21:34:17 +02:00
parent fa96f32846
commit 04c006a4a2
1 changed files with 3 additions and 1 deletions

View File

@ -266,7 +266,9 @@ static ModeMode file_browser_mode_result ( Mode *sw, int mretv, char **input, un
}
else if ( pd->array[selected_line].type == RFILE ) {
char *d = g_filename_from_utf8 ( pd->array[selected_line].path, -1, NULL, NULL, NULL );
char *cmd = g_strdup_printf ( "xdg-open '%s'", d );
char *d_esc = g_shell_quote(d);
char *cmd = g_strdup_printf ( "xdg-open %s", d_esc );
g_free(d_esc);
g_free ( d );
char *cdir = g_file_get_path ( pd->current_dir );
helper_execute_command ( cdir, cmd, FALSE, NULL );