core: correctly construct runtime path when XDG_RUNTIME_DIR missing

Fixes a typo of % as $, which broke string substitution.
This commit is contained in:
outfoxxed 2026-04-06 00:43:02 -07:00
parent 13fe9b0d98
commit 5bf6a412b0
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E

View file

@ -64,7 +64,7 @@ QDir* QsPaths::baseRunDir() {
if (this->baseRunState == DirState::Unknown) { if (this->baseRunState == DirState::Unknown) {
auto runtimeDir = qEnvironmentVariable("XDG_RUNTIME_DIR"); auto runtimeDir = qEnvironmentVariable("XDG_RUNTIME_DIR");
if (runtimeDir.isEmpty()) { if (runtimeDir.isEmpty()) {
runtimeDir = QString("/run/user/$1").arg(getuid()); runtimeDir = QString("/run/user/%1").arg(getuid());
qCInfo(logPaths) << "XDG_RUNTIME_DIR was not set, defaulting to" << runtimeDir; qCInfo(logPaths) << "XDG_RUNTIME_DIR was not set, defaulting to" << runtimeDir;
} }