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
This commit is contained in:
Guy Harris 2006-06-30 23:37:49 +00:00
parent ba9d5cd625
commit ad74ee57f7
1 changed files with 10 additions and 0 deletions

View File

@ -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;
@ -707,6 +708,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.
*/