From 54fed027ce1ef08aff607696b3bb5ea63d2af728 Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Fri, 19 May 2017 17:41:27 -0700 Subject: [PATCH] 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. --- src/platform_linux.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform_linux.cc b/src/platform_linux.cc index 41f7d8df..28c34a7f 100644 --- a/src/platform_linux.cc +++ b/src/platform_linux.cc @@ -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;