From 0baa4f37edb7cb95d4e803046e612905b2a2c2b0 Mon Sep 17 00:00:00 2001 From: IndrekV Date: Fri, 26 Jan 2018 10:07:58 +0200 Subject: [PATCH] Fixed client guid check issue that caused 'project name exists error' (lib), closes #2368 --- src/context.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/context.cc b/src/context.cc index 6c34d8d0b5..9542be1012 100644 --- a/src/context.cc +++ b/src/context.cc @@ -3552,9 +3552,11 @@ Project *Context::CreateProject( it != user_->related.Projects.end(); it++) { Project *p = *it; - auto clientIsSame = client_guid == p->ClientGUID(); + bool clientIsSame = false; if (client_id != 0 && p->CID() != 0) { clientIsSame = clientIsSame || client_id == p->CID(); + } else if (!client_guid.empty() && !p->ClientGUID().empty()) { + clientIsSame = client_guid == p->ClientGUID(); } if (clientIsSame && p->Name() == trimmed_project_name) {