mirror of
https://github.com/hyprwm/hyprpaper.git
synced 2024-08-17 15:00:30 +03:00
fix: Read absolute path of symlinks (#90)
This commit is contained in:
parent
e498c438b1
commit
5e73eb6055
@ -123,7 +123,9 @@ void CHyprpaper::preloadAllWallpapersFromConfig() {
|
||||
m_mWallpaperTargets[wp] = CWallpaperTarget();
|
||||
if (std::filesystem::is_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 {
|
||||
m_mWallpaperTargets[wp].create(wp);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user