summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/resources/wallpaper.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/resources/wallpaper.cpp b/src/resources/wallpaper.cpp
index 3301478e2..e27aa02c2 100644
--- a/src/resources/wallpaper.cpp
+++ b/src/resources/wallpaper.cpp
@@ -60,18 +60,22 @@ static void initDefaultWallpaperPaths()
// Init the path
wallpaperPath = branding.getStringValue("wallpapersPath");
- if (!wallpaperPath.empty() && resman->isDirectory(wallpaperPath))
- return;
- else
- wallpaperPath = paths.getValue("wallpapers", "graphics/images/");
+ if (wallpaperPath.empty() || !resman->isDirectory(wallpaperPath))
+ wallpaperPath = paths.getValue("wallpapers", "");
+
+ if (wallpaperPath.empty() || !resman->isDirectory(wallpaperPath))
+ wallpaperPath = "graphics/images/";
// Init the default file
wallpaperFile = branding.getStringValue("wallpaperFile");
- if (!wallpaperFile.empty())
+ if (!wallpaperFile.empty() && !resman->isDirectory(wallpaperFile))
return;
else
- wallpaperFile = paths.getValue("wallpaperFile", "login_wallpaper.png");
+ wallpaperFile = paths.getValue("wallpaperFile", "");
+
+ if (wallpaperFile.empty() || resman->isDirectory(wallpaperFile))
+ wallpaperFile = "login_wallpaper.png";
}
bool wallpaperCompare(WallpaperData a, WallpaperData b)