diff options
-rw-r--r-- | src/config/profiles.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/config/profiles.c b/src/config/profiles.c index 8a75401..8447ca2 100644 --- a/src/config/profiles.c +++ b/src/config/profiles.c @@ -345,6 +345,10 @@ unlink_recursive(const gchar *dir_path) gboolean mq_profiles_remove(MqProfiles *profiles, const gchar *profile) { + if (g_strcmp0(profile, profiles->current) == 0) { + return FALSE; + } + return unlink_recursive( g_build_filename(profiles->config_dir, profile, NULL)) && g_key_file_remove_group(profiles->key_file, profile, NULL); |