aboutsummaryrefslogtreecommitdiffstats
path: root/tshark.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2006-06-30 23:37:49 +0000
committerGuy Harris <guy@alum.mit.edu>2006-06-30 23:37:49 +0000
commitad74ee57f743fe78d00976d94e2eaa5f95ea6cef (patch)
treea211286c6b1b989e915c67617c2eac3891cc672f /tshark.c
parentba9d5cd62548f225b170c212df3cae35f9e07c88 (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.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tshark.c b/tshark.c
index 1b1aec6588..f904ee3b54 100644
--- a/tshark.c
+++ b/tshark.c
@@ -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();