mirror of
https://github.com/MaskRay/ccls.git
synced 2024-12-02 04:17:08 +00:00
Group source files outside of the project by a cache sub-directory
This commit is contained in:
parent
fe3b9c4a8a
commit
c8605dc4a9
@ -50,7 +50,8 @@ struct RealCacheManager : ICacheManager {
|
|||||||
cache_file = EscapeFileName(config_->projectRoot) + '/' +
|
cache_file = EscapeFileName(config_->projectRoot) + '/' +
|
||||||
EscapeFileName(source_file.substr(len));
|
EscapeFileName(source_file.substr(len));
|
||||||
} else {
|
} else {
|
||||||
cache_file = EscapeFileName(source_file);
|
cache_file = '@' + EscapeFileName(config_->projectRoot) + '/' +
|
||||||
|
EscapeFileName(source_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
return config_->cacheDirectory + cache_file;
|
return config_->cacheDirectory + cache_file;
|
||||||
|
@ -572,8 +572,11 @@ struct InitializeHandler : BaseMessageHandler<Ipc_InitializeRequest> {
|
|||||||
// Set project root.
|
// Set project root.
|
||||||
config->projectRoot = NormalizePath(request->params.rootUri->GetPath());
|
config->projectRoot = NormalizePath(request->params.rootUri->GetPath());
|
||||||
EnsureEndsInSlash(config->projectRoot);
|
EnsureEndsInSlash(config->projectRoot);
|
||||||
|
// Create two cache directories for files inside and outside of the project.
|
||||||
MakeDirectoryRecursive(config->cacheDirectory +
|
MakeDirectoryRecursive(config->cacheDirectory +
|
||||||
EscapeFileName(config->projectRoot));
|
EscapeFileName(config->projectRoot));
|
||||||
|
MakeDirectoryRecursive(config->cacheDirectory +
|
||||||
|
'@' + EscapeFileName(config->projectRoot));
|
||||||
|
|
||||||
Timer time;
|
Timer time;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user