Merge pull request #650 from flowln/modrinth_icons
Fix modpack icon importing with non-standard icon paths
This commit is contained in:
commit
4af8a9ed2d
@ -273,7 +273,7 @@ void IconList::installIcons(const QStringList &iconFiles)
|
|||||||
QFileInfo fileinfo(file);
|
QFileInfo fileinfo(file);
|
||||||
if (!fileinfo.isReadable() || !fileinfo.isFile())
|
if (!fileinfo.isReadable() || !fileinfo.isFile())
|
||||||
continue;
|
continue;
|
||||||
QString target = FS::PathCombine(m_dir.dirName(), fileinfo.fileName());
|
QString target = FS::PathCombine(getDirectory(), fileinfo.fileName());
|
||||||
|
|
||||||
QString suffix = fileinfo.suffix();
|
QString suffix = fileinfo.suffix();
|
||||||
if (suffix != "jpeg" && suffix != "png" && suffix != "jpg" && suffix != "ico" && suffix != "svg" && suffix != "gif")
|
if (suffix != "jpeg" && suffix != "png" && suffix != "jpg" && suffix != "ico" && suffix != "svg" && suffix != "gif")
|
||||||
@ -290,7 +290,7 @@ void IconList::installIcon(const QString &file, const QString &name)
|
|||||||
if(!fileinfo.isReadable() || !fileinfo.isFile())
|
if(!fileinfo.isReadable() || !fileinfo.isFile())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QString target = FS::PathCombine(m_dir.dirName(), name);
|
QString target = FS::PathCombine(getDirectory(), name);
|
||||||
|
|
||||||
QFile::copy(file, target);
|
QFile::copy(file, target);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user