mirror of
https://github.com/ollama/ollama.git
synced 2026-07-11 10:14:28 +00:00
compat: use UTF-8-safe file open (#16999)
Use ggml_fopen for compat tensor reads so Windows paths with Unicode characters are converted through the same UTF-8-to-wide path as llama.cpp model loading. Fixes #16493
This commit is contained in:
parent
26acfa42b5
commit
e436db25ff
1 changed files with 1 additions and 1 deletions
2
llama/compat/llama-ollama-compat-util.cpp
vendored
2
llama/compat/llama-ollama-compat-util.cpp
vendored
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue