summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--epan/filesystem.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/epan/filesystem.c b/epan/filesystem.c
index 068042896a..14ce111faf 100644
--- a/epan/filesystem.c
+++ b/epan/filesystem.c
@@ -507,17 +507,16 @@ get_datafile_dir(void)
#endif
static char *datafile_dir = NULL;
- if(datafile_dir != NULL)
+ if (datafile_dir != NULL)
return datafile_dir;
#ifdef _WIN32
u3deviceexecpath = getenv_utf8("U3_DEVICE_EXEC_PATH");
- if(u3deviceexecpath != NULL) {
+ if (u3deviceexecpath != NULL) {
datafile_dir = u3deviceexecpath;
} else {
-
/*
* Do we have the pathname of the program? If so, assume we're
* running an installed version of the program. If we fail,
@@ -529,14 +528,18 @@ get_datafile_dir(void)
* If so, perhaps we should read that from the registry,
* instead.
*/
- if (progfile_dir != NULL)
+ if (progfile_dir != NULL) {
+ /*
+ * Yes, we do; use that.
+ */
datafile_dir = progfile_dir;
- else
+ } else {
/*
- * No, we don't.
- * Fall back on the default installation directory.
- */
+ * No, we don't.
+ * Fall back on the default installation directory.
+ */
datafile_dir = "C:\\Program Files\\Wireshark\\";
+ }
}
#else
/*
@@ -648,26 +651,23 @@ get_persconffile_dir(void)
return pf_dir;
#ifdef _WIN32
-
/*
- * See if we are running in a U3 environment
+ * See if we are running in a U3 environment.
*/
-
u3appdatapath = getenv_utf8("U3_APP_DATA_PATH");
-
- if(u3appdatapath != NULL) {
-
+ if (u3appdatapath != NULL) {
+ /*
+ * We are; use the U3 application data path.
+ */
pf_dir = u3appdatapath;
-
} else {
-
/*
- * Use %APPDATA% or %USERPROFILE%, so that configuration files are
- * stored in the user profile, rather than in the home directory.
- * The Windows convention is to store configuration information
- * in the user profile, and doing so means you can use
- * Wireshark even if the home directory is an inaccessible
- * network drive.
+ * Use %APPDATA% or %USERPROFILE%, so that configuration
+ * files are stored in the user profile, rather than in
+ * the home directory. The Windows convention is to store
+ * configuration information in the user profile, and doing
+ * so means you can use Wireshark even if the home directory
+ * is an inaccessible network drive.
*/
appdatadir = getenv_utf8("APPDATA");
if (appdatadir != NULL) {
@@ -675,7 +675,7 @@ get_persconffile_dir(void)
* Concatenate %APPDATA% with "\Wireshark".
*/
pf_dir = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s",
- appdatadir, PF_DIR);
+ appdatadir, PF_DIR);
} else {
/*
* OK, %APPDATA% wasn't set, so use
@@ -683,9 +683,9 @@ get_persconffile_dir(void)
*/
userprofiledir = getenv_utf8("USERPROFILE");
if (userprofiledir != NULL) {
- pf_dir = g_strdup_printf(
- "%s" G_DIR_SEPARATOR_S "Application Data" G_DIR_SEPARATOR_S "%s",
- userprofiledir, PF_DIR);
+ pf_dir = g_strdup_printf(
+ "%s" G_DIR_SEPARATOR_S "Application Data" G_DIR_SEPARATOR_S "%s",
+ userprofiledir, PF_DIR);
} else {
/*
* Give up and use "C:".