From a5a648091760ac002120fab18247e5292b6482de Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sun, 28 Apr 2024 22:25:24 +0100 Subject: core: Move /tmp/hypr to $XDG_RUNTIME_DIR/hypr (#5788) Moves the directory containing sockets and logs. Also restructures lockfiles a bit. For consumers, check if `$XDG_RUNTIME_DIR/hypr` exists. If so, use it. If not, use the old `/tmp/hypr`. --- src/plugins/HookSystem.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/plugins/HookSystem.cpp') diff --git a/src/plugins/HookSystem.cpp b/src/plugins/HookSystem.cpp index 2b1f1193..2fee1bc5 100644 --- a/src/plugins/HookSystem.cpp +++ b/src/plugins/HookSystem.cpp @@ -2,6 +2,7 @@ #include "../debug/Log.hpp" #include "../helpers/VarList.hpp" #include "../managers/TokenManager.hpp" +#include "../Compositor.hpp" #define register #include @@ -138,7 +139,7 @@ CFunctionHook::SAssembly CFunctionHook::fixInstructionProbeRIPCalls(const SInstr currentAddress += len; } - const auto RANDOMDIR = "/tmp/hypr/" + g_pTokenManager->getRandomUUID(); + const auto RANDOMDIR = g_pCompositor->m_szInstancePath + "/" + g_pTokenManager->getRandomUUID(); if (std::filesystem::exists(RANDOMDIR)) { Debug::log(ERR, "[hooksystem] random out dir exists??"); -- cgit v1.2.3