fix: allow symbolic links, no effects on unix(-like) systems though

This commit is contained in:
2025-08-06 02:37:25 +02:00
parent 304f71f913
commit b99c108503
4 changed files with 11 additions and 5 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
/*
* @Author: Uyanide pywang0608@foxmail.com
* @Date: 2025-08-05 01:34:52
* @LastEditTime: 2025-08-06 00:23:54
* @LastEditTime: 2025-08-06 02:34:10
* @Description: Configuration manager.
*/
#include "config.h"
@@ -227,7 +227,7 @@ bool Config::isValidImageFile(const QString &filePath) {
}
// check if normal file
QFileInfo fileInfo(filePath);
if (!fileInfo.isFile() || !fileInfo.isReadable()) {
if (!(fileInfo.isFile() || fileInfo.isSymbolicLink()) || !fileInfo.isReadable()) {
warn(QString("Invalid file: %1").arg(filePath));
return false;
}