fix: allow symbolic links, no effects on unix(-like) systems though
This commit is contained in:
+7
-1
@@ -1,4 +1,10 @@
|
|||||||
#!/bin/env bash
|
#!/bin/env bash
|
||||||
|
###
|
||||||
|
# @Author: Uyanide pywang0608@foxmail.com
|
||||||
|
# @Date: 2025-08-06 01:43:32
|
||||||
|
# @LastEditTime: 2025-08-06 02:28:12
|
||||||
|
# @Description:
|
||||||
|
###
|
||||||
|
|
||||||
path="$(dirname "$(readlink -f "$0")")"
|
path="$(dirname "$(readlink -f "$0")")"
|
||||||
|
|
||||||
@@ -10,7 +16,7 @@ cmake --build "$path/../build" --target install || exit 1
|
|||||||
|
|
||||||
cp "$path/wallpaper_chooser.desktop" "$HOME"/.local/share/applications/wallpaper_chooser.desktop
|
cp "$path/wallpaper_chooser.desktop" "$HOME"/.local/share/applications/wallpaper_chooser.desktop
|
||||||
|
|
||||||
echo -e "\nExec=$HOME/.local/bin/wallpaper_chooser" >> "$HOME"/.local/share/applications/wallpaper_chooser.desktop
|
echo "Exec=$HOME/.local/bin/wallpaper_chooser" >> "$HOME"/.local/share/applications/wallpaper_chooser.desktop
|
||||||
|
|
||||||
if command -v update-desktop-database &> /dev/null; then
|
if command -v update-desktop-database &> /dev/null; then
|
||||||
update-desktop-database "$HOME"/.local/share/applications/
|
update-desktop-database "$HOME"/.local/share/applications/
|
||||||
|
|||||||
@@ -5,4 +5,4 @@ Name=Wallpaper Chooser
|
|||||||
Comment=A small wallpaper utility made with Qt
|
Comment=A small wallpaper utility made with Qt
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Categories=Application;Utility;
|
Categories=Application;Utility;
|
||||||
StartupNotify=true
|
StartupNotify=true
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
"~/.config/backgrounds"
|
"~/.config/backgrounds"
|
||||||
],
|
],
|
||||||
"excludes": [
|
"excludes": [
|
||||||
"~/.config/backgrounds/nao-start-crop-adjusted.jpg",
|
"~/.config/backgrounds/nao-stars-crop-adjust-flop.jpg",
|
||||||
"~/.config/backgrounds/miku-gate.jpg",
|
"~/.config/backgrounds/miku-gate.jpg",
|
||||||
"~/.config/backgrounds/README.md"
|
"~/.config/backgrounds/README.md"
|
||||||
]
|
]
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: Uyanide pywang0608@foxmail.com
|
* @Author: Uyanide pywang0608@foxmail.com
|
||||||
* @Date: 2025-08-05 01:34:52
|
* @Date: 2025-08-05 01:34:52
|
||||||
* @LastEditTime: 2025-08-06 00:23:54
|
* @LastEditTime: 2025-08-06 02:34:10
|
||||||
* @Description: Configuration manager.
|
* @Description: Configuration manager.
|
||||||
*/
|
*/
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@@ -227,7 +227,7 @@ bool Config::isValidImageFile(const QString &filePath) {
|
|||||||
}
|
}
|
||||||
// check if normal file
|
// check if normal file
|
||||||
QFileInfo fileInfo(filePath);
|
QFileInfo fileInfo(filePath);
|
||||||
if (!fileInfo.isFile() || !fileInfo.isReadable()) {
|
if (!(fileInfo.isFile() || fileInfo.isSymbolicLink()) || !fileInfo.isReadable()) {
|
||||||
warn(QString("Invalid file: %1").arg(filePath));
|
warn(QString("Invalid file: %1").arg(filePath));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user