[gnome-builder/wip/gtk4-port] libide/projects: empty name is invalid



commit 9c39c79ab44dc0cc19b3199b1dfb9f92cdd3c42c
Author: Christian Hergert <chergert redhat com>
Date:   Fri May 27 15:58:52 2022 -0700

    libide/projects: empty name is invalid

 src/libide/projects/ide-template-input.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/libide/projects/ide-template-input.c b/src/libide/projects/ide-template-input.c
index 03c8e7be2..ce0fee403 100644
--- a/src/libide/projects/ide-template-input.c
+++ b/src/libide/projects/ide-template-input.c
@@ -978,7 +978,9 @@ ide_template_input_validate (IdeTemplateInput *self)
   if (template && !ide_project_template_validate_app_id (template, self->app_id))
     flags |= IDE_TEMPLATE_INPUT_INVAL_APP_ID;
 
-  if (template && !ide_project_template_validate_name (template, self->name))
+  if (ide_str_empty0 (self->name))
+    flags |= IDE_TEMPLATE_INPUT_INVAL_NAME;
+  else if (template && !ide_project_template_validate_name (template, self->name))
     flags |= IDE_TEMPLATE_INPUT_INVAL_NAME;
 
   if (self->directory == NULL ||


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]