]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
fix: Don't crash on full disk when recompressing the cache
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 4 Feb 2024 14:33:51 +0000 (15:33 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 4 Feb 2024 14:33:51 +0000 (15:33 +0100)
src/core/AtomicFile.cpp

index a709a75ac3584eab462484f384518cd8df77b276..9efffa9a23b420bc35f6065cd30d0dbc81fa6030 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2019-2023 Joel Rosdahl and other contributors
+// Copyright (C) 2019-2024 Joel Rosdahl and other contributors
 //
 // See doc/AUTHORS.adoc for a complete list of contributors.
 //
@@ -32,7 +32,7 @@ namespace core {
 AtomicFile::AtomicFile(const fs::path& path, Mode mode) : m_path(path)
 {
   auto tmp_file =
-    util::value_or_throw<core::Fatal>(util::TemporaryFile::create(path));
+    util::value_or_throw<core::Error>(util::TemporaryFile::create(path));
   m_stream = fdopen(tmp_file.fd.release(), mode == Mode::binary ? "w+b" : "w+");
   m_tmp_path = std::move(tmp_file.path);
 }