mirror of
https://github.com/MaskRay/ccls.git
synced 2025-06-08 01:04:54 +00:00
Small fixes
This commit is contained in:
parent
ed548b11da
commit
a57957702e
@ -161,7 +161,7 @@ std::string GetExternalCommandOutput(const std::vector<std::string> &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());
|
||||
|
@ -351,6 +351,7 @@ void Project::LoadDirectory(const std::string &root, Project::Folder &folder) {
|
||||
std::string err_msg;
|
||||
std::unique_ptr<tooling::CompilationDatabase> 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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user