From db462838abe6b1cb1d1d99d6dc63194e9ac3d033 Mon Sep 17 00:00:00 2001 From: Brad King <brad.king@kitware.com> Date: Tue, 12 Mar 2019 09:48:27 -0400 Subject: [PATCH] SystemTools: Revert "Use copyfile(3) to clone files on macOS" Revert commit 7c71e8791 (SystemTools: Use copyfile(3) to clone files on macOS, 2019-03-05) because it changed the semantics of the copy operation w.r.t. the timestamp left on the new file. Further investigation is needed to use `copyfile` while preserving semantics. --- SystemTools.cxx | 8 -------- 1 file changed, 8 deletions(-) diff --git a/SystemTools.cxx b/SystemTools.cxx index 010576c7..33a92e4c 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -86,10 +86,6 @@ # include <linux/fs.h> #endif -#ifdef __APPLE__ -# include <copyfile.h> -#endif - // Windows API. #if defined(_WIN32) # include <windows.h> @@ -2301,10 +2297,6 @@ static bool CloneFileContent(const std::string& source, } return true; -#elif defined(__APPLE__) && defined(COPYFILE_CLONE) - SystemTools::RemoveFile(destination); - return copyfile(source.c_str(), destination.c_str(), NULL, COPYFILE_CLONE) == - 0; #else (void)source; (void)destination; -- GitLab