Merge pull request #3215 from Trial97/fix_custom_instance_icons

Fix curseforge/modrinth instance icons
This commit is contained in:
Alexandru Ionut Tripon 2025-01-09 00:10:39 +02:00 committed by GitHub
commit 33981b9870
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -196,7 +196,8 @@ void IconList::directoryChanged(const QString& path)
qDebug() << "Adding icon " << addedPath; qDebug() << "Adding icon " << addedPath;
QFileInfo addfile(addedPath); QFileInfo addfile(addedPath);
QString key = m_dir.relativeFilePath(addfile.absoluteFilePath()); QString relativePath = m_dir.relativeFilePath(addfile.absoluteFilePath());
QString key = QFileInfo(relativePath).completeBaseName();
QString name = formatName(m_dir, addfile); QString name = formatName(m_dir, addfile);
if (addIcon(key, name, addfile.filePath(), IconType::FileBased)) { if (addIcon(key, name, addfile.filePath(), IconType::FileBased)) {