From fe9e26d5d9dfde8f7d140b5e36af7f5c5c3d8f51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Cantar=C3=ADn?= Date: Tue, 25 May 2021 15:59:53 -0300 Subject: [PATCH] Remove "atomic" warning for HttpFile Fixes #945. --- packager/file/file.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packager/file/file.cc b/packager/file/file.cc index 92825b97b5..01b16f76c4 100644 --- a/packager/file/file.cc +++ b/packager/file/file.cc @@ -287,7 +287,10 @@ bool File::WriteFileAtomically(const char* file_name, // Skip the warning message for memory files, which is meant for testing // anyway.. - if (strncmp(file_name, kMemoryFilePrefix, strlen(kMemoryFilePrefix)) != 0) { + // Also check for http files, as they can't do atomic writes. + if (strncmp(file_name, kMemoryFilePrefix, strlen(kMemoryFilePrefix)) != 0 + && strncmp(file_name, kHttpFilePrefix, strlen(kHttpFilePrefix)) != 0 + && strncmp(file_name, kHttpsFilePrefix, strlen(kHttpsFilePrefix)) != 0) { LOG(WARNING) << "Writing to " << file_name << " is not guaranteed to be atomic."; }