fix: use absolute path when installing icons

This commit is contained in:
flow 2022-05-27 09:15:32 -03:00
parent 3ff26d5cfe
commit 5d3bef32ca
No known key found for this signature in database
GPG Key ID: 8D0F221F0A59F469

View File

@ -273,7 +273,7 @@ void IconList::installIcons(const QStringList &iconFiles)
QFileInfo fileinfo(file);
if (!fileinfo.isReadable() || !fileinfo.isFile())
continue;
QString target = FS::PathCombine(m_dir.dirName(), fileinfo.fileName());
QString target = FS::PathCombine(getDirectory(), fileinfo.fileName());
QString suffix = fileinfo.suffix();
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())
return;
QString target = FS::PathCombine(m_dir.dirName(), name);
QString target = FS::PathCombine(getDirectory(), name);
QFile::copy(file, target);
}