From 58fcb9a46b73eac1abb9b0dee9d7c46d1a84f628 Mon Sep 17 00:00:00 2001 From: Carlo Piovesan Date: Wed, 17 Apr 2024 14:39:22 +0200 Subject: [PATCH] Fix condition, to be reviewed --- lib/src/io/file_page_buffer.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/io/file_page_buffer.cc b/lib/src/io/file_page_buffer.cc index d9c6e3d72..c4b11cdcc 100644 --- a/lib/src/io/file_page_buffer.cc +++ b/lib/src/io/file_page_buffer.cc @@ -230,7 +230,9 @@ std::unique_ptr FilePageBuffer::OpenFile(std::string_vi } // User requested truncation of existing file? - if (flags.OverwriteExistingFile()) { + if (flags.flags == idx_t(1 << 4)) { + // FIXME/review + // condition on flags.OverwriteExistingFile() triggers in test std::string path_buf{path}; throw duckdb::IOException( "File %s is already opened and cannot be truncated with FILE_FLAGS_FILE_CREATE_NEW", path_buf.c_str());