From 6a8fa27c8d2a1b3e9c075b94415e75483248c096 Mon Sep 17 00:00:00 2001 From: Aaron Miller Date: Wed, 12 Jul 2023 14:12:41 -0400 Subject: [PATCH] Correctly find models in subdirs of model dir QDirIterator doesn't seem particular subdir aware, its path() returns the iterated dir. This was the simplest way I found to get this right. --- gpt4all-chat/modellist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpt4all-chat/modellist.cpp b/gpt4all-chat/modellist.cpp index 5f43e0fd..6aacc82d 100644 --- a/gpt4all-chat/modellist.cpp +++ b/gpt4all-chat/modellist.cpp @@ -821,7 +821,7 @@ void ModelList::updateModelsFromDirectory() for (const QString &id : modelsById) { updateData(id, FilenameRole, filename); updateData(id, ChatGPTRole, filename.startsWith("chatgpt-")); - updateData(id, DirpathRole, path); + updateData(id, DirpathRole, info.dir().absolutePath() + "/"); updateData(id, FilesizeRole, toFileSize(info.size())); } }