diff --git a/clients/cli/settings.c b/clients/cli/settings.c index 2446cb0856..91aaf28e38 100644 --- a/clients/cli/settings.c +++ b/clients/cli/settings.c @@ -549,12 +549,6 @@ nmc_setting_set_property (NMClient *client, if (!property_info->property_type->set_fcn) goto out_fail_read_only; - if ( NM_IN_SET (modifier, '+', '-') - && !value) { - /* nothing to do. */ - return TRUE; - } - if ( modifier == '-' && !property_info->property_type->set_supports_remove) { /* The property is a plain property. It does not support '-'. @@ -578,6 +572,13 @@ nmc_setting_set_property (NMClient *client, } } + if ( NM_IN_SET (modifier, '+', '-') + && ( !value + || !value[0])) { + /* nothing to do. */ + return TRUE; + } + g_object_freeze_notify (G_OBJECT (setting)); success = property_info->property_type->set_fcn (property_info, nmc_meta_environment,