diff options
author | Guy Harris <guy@alum.mit.edu> | 2006-06-30 23:37:49 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2006-06-30 23:37:49 +0000 |
commit | ad74ee57f743fe78d00976d94e2eaa5f95ea6cef (patch) | |
tree | a211286c6b1b989e915c67617c2eac3891cc672f /tshark.c | |
parent | ba9d5cd62548f225b170c212df3cae35f9e07c88 (diff) |
Call init_progfile_dir() - on Windows, at least, it's necessary in order
to get the directory where the data files are stored, and on UN*X we
might have an option in the future to have it search there for data
files, to make it easier to run WireShark/TShark from the build
directory and have it find plugins, etc..
svn path=/trunk/; revision=18622
Diffstat (limited to 'tshark.c')
-rw-r--r-- | tshark.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -660,6 +660,7 @@ output_file_description(const char *fname) int main(int argc, char *argv[]) { + char *init_progfile_dir_error; int opt, i; extern char *optarg; gboolean arg_error = FALSE; @@ -708,6 +709,15 @@ main(int argc, char *argv[]) static const char optstring[] = OPTSTRING_INIT OPTSTRING_WIN32; /* + * Attempt to get the pathname of the executable file. + */ + init_progfile_dir_error = init_progfile_dir(argv[0]); + if (init_progfile_dir_error != NULL) { + fprintf(stderr, "tshark: Can't get pathname of tshark program: %s.\n", + init_progfile_dir_error); + } + + /* * Get credential information for later use. */ get_credential_info(); |