fix: use absolute path when installing icons
This commit is contained in:
parent
3ff26d5cfe
commit
5d3bef32ca
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user