From 946729f14d00b62b7673b015aad596526b12f765 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sat, 26 Oct 2024 22:46:09 +0200 Subject: [PATCH] Adding forced update to Layout writer to ensure proper files. A warning is given. --- src/db/db/dbWriter.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/db/db/dbWriter.cc b/src/db/db/dbWriter.cc index 94e6c6473..9738835f0 100644 --- a/src/db/db/dbWriter.cc +++ b/src/db/db/dbWriter.cc @@ -58,6 +58,11 @@ Writer::write (db::Layout &layout, tl::OutputStream &stream) { tl::SelfTimer timer (tl::verbosity () >= 21, tl::to_string (tr ("Writing file: ")) + stream.path ()); + if (layout.under_construction ()) { + tl::warn << tl::to_string (tr ("Cannot properly write a layout that is under construction - forcing update.")); + layout.force_update (); + } + tl_assert (mp_writer != 0); mp_writer->write (layout, stream, m_options); }