From 740350c8ea3084ad2d557db3b33868edce67b633 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Wed, 18 Mar 2026 12:10:22 -0700 Subject: [PATCH] FEXpidof: Fixes another missing std::filesystem throw Turns out std::filesystem::exists throws as well if there was an underlying OS API failure. --- Source/Tools/pidof/pidof.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Tools/pidof/pidof.cpp b/Source/Tools/pidof/pidof.cpp index fb8a5f207..32bc9f3c9 100644 --- a/Source/Tools/pidof/pidof.cpp +++ b/Source/Tools/pidof/pidof.cpp @@ -147,7 +147,8 @@ static void IteratePids() { auto ExePath = Entry.path() / "exe"; // If cmdline doesn't exist then skip. - if (!std::filesystem::exists(CMDLinePath)) { + std::error_code ec; + if (!std::filesystem::exists(CMDLinePath, ec) || ec) { continue; } @@ -177,7 +178,6 @@ static void IteratePids() { } } - std::error_code ec; std::string exe_link = std::filesystem::read_symlink(ExePath, ec); auto deleted_pos = exe_link.find(" (deleted)");