Skip to content

Commit

Permalink
Fix condition, to be reviewed
Browse files Browse the repository at this point in the history
  • Loading branch information
carlopi authored and Mytherin committed Apr 17, 2024
1 parent 546ecad commit 58fcb9a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/src/io/file_page_buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,9 @@ std::unique_ptr<FilePageBuffer::FileRef> 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());
Expand Down

0 comments on commit 58fcb9a

Please sign in to comment.