diff options
author | Vaxry <[email protected]> | 2024-04-28 21:20:10 +0100 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-04-28 21:20:10 +0100 |
commit | 95a5e75c260a2ed46e7b21b9a9bb7e58bdcdfa21 (patch) | |
tree | b0e3b7f7cbb5c9da1910a4be3f458f3e6179e481 /src | |
parent | 335015fe2defae76b4fd22ebfe8e3614a01495b7 (diff) | |
download | Hyprland-95a5e75c260a2ed46e7b21b9a9bb7e58bdcdfa21.tar.gz Hyprland-95a5e75c260a2ed46e7b21b9a9bb7e58bdcdfa21.zip |
hooksystem: check for existing random outdir
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/HookSystem.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/HookSystem.cpp b/src/plugins/HookSystem.cpp index 7ae71726..2b1f1193 100644 --- a/src/plugins/HookSystem.cpp +++ b/src/plugins/HookSystem.cpp @@ -140,7 +140,13 @@ CFunctionHook::SAssembly CFunctionHook::fixInstructionProbeRIPCalls(const SInstr const auto RANDOMDIR = "/tmp/hypr/" + g_pTokenManager->getRandomUUID(); - mkdir(RANDOMDIR.c_str(), S_IRWXU); + if (std::filesystem::exists(RANDOMDIR)) { + Debug::log(ERR, "[hooksystem] random out dir exists??"); + return {}; + } + + if (mkdir(RANDOMDIR.c_str(), S_IRWXU) < 0) + return {}; if (!std::filesystem::exists(RANDOMDIR)) return {}; |