diff options
author | Guy Harris <guy@alum.mit.edu> | 2012-09-18 23:08:43 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2012-09-18 23:08:43 +0000 |
commit | f665fd47779394072d675a163e9d575c56c67fef (patch) | |
tree | 0582b38cf6f4db03602dc999f3c05f4f3293486f /ui | |
parent | c4d22dbe11ad66c7e09c39fa823d75b8846c6832 (diff) | |
download | wireshark-f665fd47779394072d675a163e9d575c56c67fef.tar.gz wireshark-f665fd47779394072d675a163e9d575c56c67fef.tar.bz2 wireshark-f665fd47779394072d675a163e9d575c56c67fef.zip |
Fix call to g_filename_to_uri(), and do error checking.
svn path=/trunk/; revision=44992
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gtk/webbrowser.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/ui/gtk/webbrowser.c b/ui/gtk/webbrowser.c index 06514c2ddc..56ddd8636c 100644 --- a/ui/gtk/webbrowser.c +++ b/ui/gtk/webbrowser.c @@ -344,7 +344,7 @@ filemanager_open_directory (const gchar *path) #elif defined(MUST_LAUNCH_BROWSER_OURSELVES) - GError *error = NULL; + GError *error; gchar *browser; gchar *argument; gchar *cmd; @@ -366,7 +366,16 @@ filemanager_open_directory (const gchar *path) } /* conver the path to a URI */ - argument = g_filename_to_uri(path); + argument = g_filename_to_uri(path, NULL, &error); + if (argument == NULL) + { + simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK, + "%sCould not convert \"%s\" to a URI: \"%s\"%s\n\n\"%s\"\n\n", + simple_dialog_primary_start(), path, simple_dialog_primary_end(), + error->message); + g_error_free (error); + return FALSE; + } /* replace %s with URL */ if (strstr (browser, "%s")) |