summaryrefslogtreecommitdiff
path: root/epan/filesystem.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2008-01-24 17:06:22 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2008-01-24 17:06:22 +0000
commit6a31f43f8bdf87d21b1de26ee36851182c59f10c (patch)
tree9548ada21e31162631a84edec9b42867845beac9 /epan/filesystem.c
parentdc0b8a0727bd2ccedea3ec55aefa2c82889d027f (diff)
downloadwireshark-6a31f43f8bdf87d21b1de26ee36851182c59f10c.tar.gz
Always return a valid profile name from get_profile_name().
svn path=/trunk/; revision=24175
Diffstat (limited to 'epan/filesystem.c')
-rw-r--r--epan/filesystem.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/epan/filesystem.c b/epan/filesystem.c
index e9ca4fc509..13995f2aed 100644
--- a/epan/filesystem.c
+++ b/epan/filesystem.c
@@ -804,7 +804,11 @@ set_profile_name(const gchar *profilename)
const char *
get_profile_name(void)
{
- return persconfprofile;
+ if (persconfprofile) {
+ return persconfprofile;
+ } else {
+ return DEFAULT_PROFILE;
+ }
}
/*
@@ -1098,7 +1102,7 @@ create_persconffile_profile(const char *profilename, char **pf_dir_path_return)
int
create_persconffile_dir(char **pf_dir_path_return)
{
- return create_persconffile_profile(get_profile_name(), pf_dir_path_return);
+ return create_persconffile_profile(persconfprofile, pf_dir_path_return);
}
/*
@@ -1240,7 +1244,7 @@ get_persconffile_path(const char *filename, gboolean from_profile, gboolean for_
if (from_profile) {
path = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s",
- get_persconffile_dir(get_profile_name()), filename);
+ get_persconffile_dir(persconfprofile), filename);
} else {
path = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s",
get_persconffile_dir(NULL), filename);