From f2c72b8f1f39ee189b8f4c161532080dbe8608f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Gallou=C3=ABt?= Date: Wed, 25 Mar 2026 19:18:06 +0100 Subject: [PATCH] common : fix gguf selection in common_list_cached_models (#20996) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Adrien Gallouët --- common/download.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/download.cpp b/common/download.cpp index b0abbba8f6..fa2e6fb280 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;