From a7e44bae3fa43c2c9374687e57bce9ee29f96429 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Tue, 8 Sep 2020 20:09:52 +0200 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20log=20stat=20error=20in=20Util::?= =?utf8?q?read=5Ffile?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit An error is signalled via an exception so let’s make it up to the caller whether to log or not. --- src/Util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Util.cpp b/src/Util.cpp index 78e3d8445..bdb163956 100644 --- a/src/Util.cpp +++ b/src/Util.cpp @@ -1090,7 +1090,7 @@ std::string read_file(const std::string& path, size_t size_hint) { if (size_hint == 0) { - auto stat = Stat::stat(path, Stat::OnError::log); + auto stat = Stat::stat(path); if (!stat) { throw Error(strerror(errno)); } -- 2.47.3