diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-01-30 20:06:49 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-01-31 04:07:14 +0000 |
commit | 90233fff275be76b0d85a686b73cad05e14c7391 (patch) | |
tree | 2bbf197a6612310cb3480415e55bed102931770b /wireshark-qt.cpp | |
parent | cca2cde68e621213a0825b19e5b71c09c2fb581a (diff) |
We need to get the pathname of the executable *before* running dumpcap.
In order to find dumpcap, we need to get the pathname of the executable
image, and we support -D in the first argument parsing loop, and that
runs dumpcap to get the interface list, so we need to get the pathname
of the executable image before that.
Change-Id: If789cf1ff4f5cf5d5c3b171a3d4eb90a6e2faf1d
Reviewed-on: https://code.wireshark.org/review/6869
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wireshark-qt.cpp')
-rw-r--r-- | wireshark-qt.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/wireshark-qt.cpp b/wireshark-qt.cpp index 4b50045dff..8236c968b0 100644 --- a/wireshark-qt.cpp +++ b/wireshark-qt.cpp @@ -477,6 +477,12 @@ int main(int argc, char *argv[]) init_process_policies(); relinquish_special_privs_perm(); + /* + * Attempt to get the pathname of the executable file. + */ + /* init_progfile_dir_error = */ init_progfile_dir(argv[0], main); + g_log(NULL, G_LOG_LEVEL_DEBUG, "progfile_dir: %s", get_progfile_dir()); + /* Get the compile-time version information string */ // XXX qtshark comp_info_str = get_compiled_version_info(get_wireshark_qt_compiled_info, @@ -609,12 +615,6 @@ int main(int argc, char *argv[]) } } - /* - * Attempt to get the pathname of the executable file. - */ - /* init_progfile_dir_error = */ init_progfile_dir(argv[0], main); - g_log(NULL, G_LOG_LEVEL_DEBUG, "progfile_dir: %s", get_progfile_dir()); - #ifdef _WIN32 reset_library_path(); #endif |