C#: a dangling link is an I/O error on read; the directory refusal echoes a header only as store version digits; contract names Rust's real type

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-02 20:49:12 +02:00
commit 425531d88e
5 changed files with 70 additions and 5 deletions

View file

@ -4012,12 +4012,17 @@ namespace GameCult.Caching
private byte[]? ReadDisk()
{
FileInfo.Refresh();
if (!FileInfo.Exists)
// Only nothing at the path is an empty store. A link whose target is gone is a store that cannot be reached.
if (!FileInfo.Exists && FileInfo.LinkTarget == null)
return null;
try
{
return ReadAllBytesShared(FileInfo.FullName);
}
catch (FileNotFoundException ex) when (FileInfo.LinkTarget != null)
{
throw new IOException("The store path is a link whose target cannot be reached.", ex);
}
catch (FileNotFoundException)
{
return null;