Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reader/csv: Use binary mode on Windows #2121

Merged
merged 1 commit into from
Sep 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ BaseCSVReader::BaseCSVReader(const std::string& filePath, const common::ReaderCo
buffer(nullptr), bufferSize(0), position(0), rowEmpty(false), mode(ParserMode::INVALID),
rowToAdd(0) {
// TODO(Ziyi): should we wrap this fd using kuzu file handler?
fd = open(filePath.c_str(), O_RDONLY);
fd = open(filePath.c_str(), O_RDONLY
#ifdef _WIN32
| _O_BINARY
#endif
);
if (fd == -1) {
throw CopyException(
StringUtils::string_format("Could not open file {}: {}", filePath, strerror(errno)));
Expand Down
Loading