Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

compat: use UTF-8-safe file open (#16999)

Daniel Hiltgene436db25ff44
diff --git a/llama/compat/llama-ollama-compat-util.cpp b/llama/compat/llama-ollama-compat-util.cpp
index d09d6fde9..7520608aa 100644
--- a/llama/compat/llama-ollama-compat-util.cpp
+++ b/llama/compat/llama-ollama-compat-util.cpp
@@ -275,7 +275,7 @@ bool take_load_op(const char * dest_name, LoadOp & out) {
}
bool read_at(const char * path, size_t offset, void * dst, size_t size) {
- FILE * f = std::fopen(path, "rb");
+ FILE * f = ggml_fopen(path, "rb");
if (!f) {
std::fprintf(stderr, "%s: open failed path=%s offset=%zu size=%zu errno=%d (%s)\n",
__func__, path, offset, size, errno, std::strerror(errno));