mirror of
https://github.com/hyprwm/hyprpaper.git
synced 2024-12-22 20:29:48 +01:00
Can preload recursive symlinks now
This commit is contained in:
parent
43b6e9d2e2
commit
2b79075feb
1 changed files with 6 additions and 7 deletions
|
@ -129,14 +129,13 @@ void CHyprpaper::preloadAllWallpapersFromConfig() {
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
m_mWallpaperTargets[wp] = CWallpaperTarget();
|
m_mWallpaperTargets[wp] = CWallpaperTarget();
|
||||||
if (std::filesystem::is_symlink(wp)) {
|
std::filesystem::path create_wp = wp;
|
||||||
auto real_wp = std::filesystem::read_symlink(wp);
|
while (std::filesystem::is_symlink(create_wp)) {
|
||||||
std::filesystem::path absolute_path = std::filesystem::path(wp).parent_path() / real_wp;
|
auto real_wp = std::filesystem::read_symlink(create_wp);
|
||||||
absolute_path = absolute_path.lexically_normal();
|
std::filesystem::path absolute_path = std::filesystem::path(create_wp).parent_path() / real_wp;
|
||||||
m_mWallpaperTargets[wp].create(absolute_path);
|
create_wp = absolute_path.lexically_normal();
|
||||||
} else {
|
|
||||||
m_mWallpaperTargets[wp].create(wp);
|
|
||||||
}
|
}
|
||||||
|
m_mWallpaperTargets[wp].create(create_wp);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_pConfigManager->m_dRequestedPreloads.clear();
|
g_pConfigManager->m_dRequestedPreloads.clear();
|
||||||
|
|
Loading…
Reference in a new issue