Make cacheDirectory related to project root

This commit is contained in:
Fangrui Song 2018-12-23 11:30:31 -08:00
parent b7ad7c110e
commit b1492fedef

View File

@ -282,7 +282,7 @@ void Initialize(MessageHandler *m, InitializeParam &param, ReplyOnce &reply) {
if (g_config->cacheDirectory.size()) {
SmallString<256> Path(g_config->cacheDirectory);
sys::fs::make_absolute(Path);
sys::fs::make_absolute(project_path, Path);
g_config->cacheDirectory = Path.str();
EnsureEndsInSlash(g_config->cacheDirectory);
}