From: Adrien Gallouët Date: Wed, 25 Mar 2026 18:18:06 +0000 (+0100) Subject: common : fix gguf selection in common_list_cached_models (#20996) X-Git-Tag: upstream/0.0.8611~83 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=f2c72b8f1f39ee189b8f4c161532080dbe8608f1;p=pkg%2Fggml%2Fsources%2Fllama.cpp common : fix gguf selection in common_list_cached_models (#20996) Signed-off-by: Adrien Gallouët --- diff --git a/common/download.cpp b/common/download.cpp index b0abbba8f..fa2e6fb28 100644 --- a/common/download.cpp +++ b/common/download.cpp @@ -454,7 +454,9 @@ static gguf_split_info get_gguf_split_info(const std::string & path) { std::smatch m; std::string prefix = path; - string_remove_suffix(prefix, ".gguf"); + if (!string_remove_suffix(prefix, ".gguf")) { + return {}; + } int index = 1; int count = 1;