mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-29 19:07: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) + '/' +
|
||||
EscapeFileName(source_file.substr(len));
|
||||
} else {
|
||||
cache_file = EscapeFileName(source_file);
|
||||
cache_file = '@' + EscapeFileName(config_->projectRoot) + '/' +
|
||||
EscapeFileName(source_file);
|
||||
}
|
||||
|
||||
return config_->cacheDirectory + cache_file;
|
||||
|
@ -572,8 +572,11 @@ struct InitializeHandler : BaseMessageHandler<Ipc_InitializeRequest> {
|
||||
// Set project root.
|
||||
config->projectRoot = NormalizePath(request->params.rootUri->GetPath());
|
||||
EnsureEndsInSlash(config->projectRoot);
|
||||
// Create two cache directories for files inside and outside of the project.
|
||||
MakeDirectoryRecursive(config->cacheDirectory +
|
||||
EscapeFileName(config->projectRoot));
|
||||
MakeDirectoryRecursive(config->cacheDirectory +
|
||||
'@' + EscapeFileName(config->projectRoot));
|
||||
|
||||
Timer time;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user