aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil/filesystem.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2018-02-07 10:10:32 +0100
committerMichael Mann <mmann78@netscape.net>2018-02-07 14:03:44 +0000
commit22824478d1bdab6b8b62c8d9a43952279abf5064 (patch)
tree8094ceffd2e12fdb379ca66ad5b0143e9608939b /wsutil/filesystem.c
parent28960d79cca262ac6b974f339697b299a1e28fef (diff)
wsutil: Allow NULL as profile name
Using NULL as profile name indicates the Default profile and profile_exists() must not return FALSE for the Default profile. This is a regression from ge0d04a75. Change-Id: I2463a7d3e12dda794f3391d999442a303d80621c Reviewed-on: https://code.wireshark.org/review/25659 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'wsutil/filesystem.c')
-rw-r--r--wsutil/filesystem.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/wsutil/filesystem.c b/wsutil/filesystem.c
index ee41489894..aec82a6c2f 100644
--- a/wsutil/filesystem.c
+++ b/wsutil/filesystem.c
@@ -1464,8 +1464,10 @@ gboolean
profile_exists(const gchar *profilename, gboolean global)
{
gchar *path = NULL, *global_path;
- if (!profilename)
+
+ if (!profilename && global)
return FALSE;
+
if (global) {
global_path = get_global_profiles_dir();
path = g_strdup_printf ("%s%s%s", global_path,