mirror of
https://github.com/hyprwm/hyprpaper.git
synced 2024-11-16 22:25:59 +01:00
fix: Read absolute path of symlinks (#90)
This commit is contained in:
parent
e498c438b1
commit
5e73eb6055
1 changed files with 3 additions and 1 deletions
|
@ -123,7 +123,9 @@ void CHyprpaper::preloadAllWallpapersFromConfig() {
|
||||||
m_mWallpaperTargets[wp] = CWallpaperTarget();
|
m_mWallpaperTargets[wp] = CWallpaperTarget();
|
||||||
if (std::filesystem::is_symlink(wp)) {
|
if (std::filesystem::is_symlink(wp)) {
|
||||||
auto real_wp = std::filesystem::read_symlink(wp);
|
auto real_wp = std::filesystem::read_symlink(wp);
|
||||||
m_mWallpaperTargets[wp].create(real_wp);
|
std::filesystem::path absolute_path = std::filesystem::path(wp).parent_path() / real_wp;
|
||||||
|
absolute_path = absolute_path.lexically_normal();
|
||||||
|
m_mWallpaperTargets[wp].create(absolute_path);
|
||||||
} else {
|
} else {
|
||||||
m_mWallpaperTargets[wp].create(wp);
|
m_mWallpaperTargets[wp].create(wp);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue