diff --git a/src/platform_win.cc b/src/platform_win.cc index ac103ca7..dd1d2816 100644 --- a/src/platform_win.cc +++ b/src/platform_win.cc @@ -161,7 +161,7 @@ std::string GetExternalCommandOutput(const std::vector &command, // fold the command line parts into a single string, quoting the arguments std::string cmdString; for (int i = 0; i < command.size(); i++) { - cmdString += ((i > 0) ? " \"" : "\"") + command[i] + "\""; + cmdString += ((i == 0) ? command[i] : (" \"" + command[i] + "\"")) ; } std::wstring cmdString_u16 = Utf8To16(cmdString.c_str()); diff --git a/src/project.cc b/src/project.cc index d111b1b1..9c7fe75c 100644 --- a/src/project.cc +++ b/src/project.cc @@ -351,6 +351,7 @@ void Project::LoadDirectory(const std::string &root, Project::Folder &folder) { std::string err_msg; std::unique_ptr CDB = tooling::CompilationDatabase::loadFromDirectory(CDBDir, err_msg); + if(err_msg.size() > 0) LOG_S(ERROR) << err_msg; if (!g_config->compilationDatabaseCommand.empty()) { RemoveDirectoryRecursive(CDBDir.c_str()); }