mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-07-21 10:39:25 +00:00
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.
This commit is contained in:
parent
8893db5896
commit
6a8fa27c8d
@ -821,7 +821,7 @@ void ModelList::updateModelsFromDirectory()
|
|||||||
for (const QString &id : modelsById) {
|
for (const QString &id : modelsById) {
|
||||||
updateData(id, FilenameRole, filename);
|
updateData(id, FilenameRole, filename);
|
||||||
updateData(id, ChatGPTRole, filename.startsWith("chatgpt-"));
|
updateData(id, ChatGPTRole, filename.startsWith("chatgpt-"));
|
||||||
updateData(id, DirpathRole, path);
|
updateData(id, DirpathRole, info.dir().absolutePath() + "/");
|
||||||
updateData(id, FilesizeRole, toFileSize(info.size()));
|
updateData(id, FilesizeRole, toFileSize(info.size()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user