Skip to content

Commit

Permalink
[FileBrowser] fix escaping of paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveDavenport committed May 10, 2021
1 parent fa96f32 commit 04c006a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/dialogs/filebrowser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit 04c006a

Please sign in to comment.