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;