]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
common : fix gguf selection in common_list_cached_models (#20996)
authorAdrien Gallouët <redacted>
Wed, 25 Mar 2026 18:18:06 +0000 (19:18 +0100)
committerGitHub <redacted>
Wed, 25 Mar 2026 18:18:06 +0000 (19:18 +0100)
Signed-off-by: Adrien Gallouët <redacted>
common/download.cpp

index b0abbba8f64b95da988c6ac7a999d728355a0b72..fa2e6fb2808e1e1b9597b23c9c3c06e1b55d9228 100644 (file)
@@ -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;