Registry Mirror
Skip to content

Conversation

@timcassell

Copy link
Copy Markdown
Collaborator

FileCleanupHelper's netstandard2.0 enumeration keeps only the entries whose ReparsePoint attribute is set:

.Where(x => (x.Attributes & FileAttributes.ReparsePoint) != 0);

That is the opposite of the AttributesToSkip = FileAttributes.ReparsePoint the other branch passes. On a .NET Framework host it means cleanup enumerates only symlinks and junctions, skips every regular file, and the closing directoryInfo.Delete(recursive: false) then throws into TryExecute's empty catch. The work directory survives, so the cleanup added in #3175 has never run on that host.

A stale work directory is not inert — the generated project imports files it finds beside itself, so leftovers from an earlier run can be picked up by the next one.

Both enumerators are fixed. FileCleanupHelperTests covers the file and the directory entry points, including the read-only cases #3175 called out; on net472 the two directory cases fail without the fix (Failed: 2, Passed: 2) and pass with it. Full unit suite is green on net10.0 and net472.

🤖 Generated with Claude Code

FileCleanupHelper's netstandard2.0 enumeration kept only the entries whose
ReparsePoint attribute was set, the opposite of the AttributesToSkip the
other branch passes. On a .NET Framework host that left every regular file
in place, so the recursive Delete then threw into TryExecute's empty catch
and the work directory survived - the cleanup #3175 added never ran there.

A stale directory is not inert: the generated project imports files it finds
beside itself, so leftovers from an earlier run can be picked up by the next
one.

The tests cover both the file and the directory entry points; the two
directory cases fail on net472 without this fix.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant