Fix portable rizin system themes loading (#3632)

Regression introduced in 4e53fd64 for the macOS application bundle:
rz_path_set_prefix() is only applied to the core-global RzPath instance,
but the ColorThemeWorker created its own instance, ignoring this
setting.
This led to the message box saying "The Rizin standard themes could not
be found in..." on startup.
This commit is contained in:
Florian Märkl 2026-06-25 11:28:12 +02:00 committed by GitHub
parent aedf4e8170
commit d48436b8e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -56,8 +56,8 @@ ColorThemeWorker::ColorThemeWorker(QObject *parent) : QObject(parent)
QDir().mkpath(customRzThemesLocationPath);
}
RzPath *sysPath = rz_path_new();
const char *themeDir = rz_path_system(sysPath, RZ_THEMES);
RzCoreLocked core = Core()->lock();
const char *themeDir = rz_path_system(core->sys_path, RZ_THEMES);
const QDir currDir { themeDir };
if (currDir.exists()) {
standardRzThemesLocationPath = currDir.absolutePath();
@ -67,7 +67,6 @@ ColorThemeWorker::ColorThemeWorker(QObject *parent) : QObject(parent)
"Most likely, Rizin is not properly installed.")
.arg(currDir.path()));
}
rz_path_free(sysPath);
}
QColor ColorThemeWorker::mergeColors(const QColor &upper, const QColor &lower) const