diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-06-05 14:28:40 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-06 07:39:32 +0200 |
commit | 31afceeade6dd852a8b7a71805b21a20e502229a (patch) | |
tree | 54c08d6f3970802260e08f37de24fe40cae201e0 /src/Conf.cpp | |
parent | 0c287d0bbf28618cfe65807f7c858d19136e5854 (diff) |
Add sibs init to init project in existing directory
Diffstat (limited to 'src/Conf.cpp')
-rw-r--r-- | src/Conf.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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; } |