From 31afceeade6dd852a8b7a71805b21a20e502229a Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 5 Jun 2018 14:28:40 +0200 Subject: Add sibs init to init project in existing directory --- src/Conf.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Conf.cpp') diff --git a/src/Conf.cpp b/src/Conf.cpp index 883022b..4424551 100644 --- a/src/Conf.cpp +++ b/src/Conf.cpp @@ -570,12 +570,16 @@ namespace sibs bool isProjectNameValid(const string &projectName) { + if(projectName.empty()) + return false; + for(int i = 0; i < projectName.size(); ++i) { char c = projectName[i]; if(!isalpha(c) && !isdigit(c) && c != '-' && c != '_') return false; } + return true; } -- cgit v1.2.3