The presence probe (#295, D55) decides whether an entry's executable is
gone — FileGone, the one answer that lets the Agent remove the entry — or
merely unreadable. File.Exists and Directory.Exists say false for what
they may not look at, so the probe asks listings: the file in its folder's,
a folder that reads as missing in its parent's, and a listing it is refused
is Unknown. The review of #295 found those two branches untested.
ExecutablePresenceProbeTests now denies the current user rights on real
folders and gives them back in a finally (the owner can always change the
access list):
- ListDirectory denied on the game folder: the executable there and a
Gone.exe there are both Unknown, and Present again once it lists;
- ListDirectory + ReadAttributes denied on the game folder and
ListDirectory on the library folder it is in: Directory.Exists says false
for the game folder, and the probe still says Unknown.
Each skips (Assert.SkipUnless) when the process can list what it is denied
— a backup privilege enabled — rather than asserting something else.
Measured red on this machine: with the folder listing replaced by
File.Exists the first test fails (Present for a folder that will not list);
with the parent-listing check dropped the second fails with FileGone, the
answer that would have removed an installed game. Both restored.
FR-1.8 (02_SPEC) names the case.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>