util: check for xcur2png before extract

This commit is contained in:
Vaxry 2024-03-10 02:58:14 +00:00
parent 4daa132c00
commit b2cd693956
1 changed files with 3 additions and 0 deletions

View File

@ -288,6 +288,9 @@ static std::string spawnSync(const std::string& cmd) {
static std::optional<std::string> extractXTheme(const std::string& xpath, const std::string& out_) {
if (!spawnSync("xcur2png --help").contains("xcursor"))
return "missing dependency: -x requires xcur2png.";
if (!std::filesystem::exists(xpath) || !std::filesystem::exists(xpath + "/cursors"))
return "input path does not exist or is not an xcursor theme";