diff options
Diffstat (limited to 'src/sj-main.c')
-rw-r--r-- | src/sj-main.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sj-main.c b/src/sj-main.c index 55bbbb1..dc58cd1 100644 --- a/src/sj-main.c +++ b/src/sj-main.c @@ -1102,6 +1102,10 @@ static void path_pattern_changed_cb (GSettings *settings, gchar *key, gpointer u g_assert (strcmp (key, SJ_SETTINGS_PATH_PATTERN) == 0); g_free (path_pattern); path_pattern = g_settings_get_string (settings, key); + if (sj_str_is_empty (path_pattern)) { + g_free (path_pattern); + path_pattern = g_strdup (sj_get_default_path_pattern ()); + } /* TODO: sanity check the pattern */ } @@ -1113,6 +1117,10 @@ static void file_pattern_changed_cb (GSettings *settings, gchar *key, gpointer u g_assert (strcmp (key, SJ_SETTINGS_FILE_PATTERN) == 0); g_free (file_pattern); file_pattern = g_settings_get_string (settings, key); + if (sj_str_is_empty (file_pattern)) { + g_free (file_pattern); + file_pattern = g_strdup (sj_get_default_file_pattern ()); + } /* TODO: sanity check the pattern */ } |