hooksystem: check for existing random outdir

This commit is contained in:
Vaxry 2024-04-28 21:20:10 +01:00
parent 335015fe2d
commit 95a5e75c26

View file

@ -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 {};