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:
Aaron Miller 2023-07-12 14:12:41 -04:00 committed by AT
parent 8893db5896
commit 6a8fa27c8d

View File

@ -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()));
}
}