1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-11 13:50:48 -05:00

[FileBrowser] fix escaping of paths.

This commit is contained in:
Dave Davenport 2021-05-10 21:34:17 +02:00 committed by Dave Davenport
parent 14073c4a07
commit 1e4475e7db

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 ) { else if ( pd->array[selected_line].type == RFILE ) {
char *d = g_filename_from_utf8 ( pd->array[selected_line].path, -1, NULL, NULL, NULL ); 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 ); g_free ( d );
char *cdir = g_file_get_path ( pd->current_dir ); char *cdir = g_file_get_path ( pd->current_dir );
helper_execute_command ( cdir, cmd, FALSE, NULL ); helper_execute_command ( cdir, cmd, FALSE, NULL );