mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-26 01:21:57 +00:00
Fix CopyFileTo when there is already a destination file.
This fixes reindexing files, as before we would update the json but not the indexed file contents which caused code lens and references to get out of sync.
This commit is contained in:
parent
3e00e5fc0c
commit
54fed027ce
@ -189,7 +189,7 @@ void CopyFileTo(const std::string& dest, const std::string& source) {
|
||||
if (fd_from < 0)
|
||||
return;
|
||||
|
||||
int fd_to = open(dest.c_str(), O_WRONLY | O_CREAT | O_EXCL, 0666);
|
||||
int fd_to = open(dest.c_str(), O_WRONLY | O_CREAT, 0666);
|
||||
if (fd_to < 0)
|
||||
goto out_error;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user