Skip to content

fix(mail): avoid zip temp collisions#14

Merged
PaulStSmith merged 1 commit into
masterfrom
fix-mail-zip-temp-collisions
May 17, 2026
Merged

fix(mail): avoid zip temp collisions#14
PaulStSmith merged 1 commit into
masterfrom
fix-mail-zip-temp-collisions

Conversation

@PaulStSmith

Copy link
Copy Markdown
Member

Summary

  • Generate unique temporary zip file names for compressed mail attachments
  • Prevent concurrent test/application runs from sharing the same second-level timestamp zip path
  • Add regression coverage for repeated compression operations using distinct zip names

Tests

  • dotnet test .\Toolkit.Modern.Tests\ByteForge.Toolkit.Modern.Tests.csproj --configuration Debug --no-restore --filter FullyQualifiedName~EmailAttachmentHandlerTests
  • net9.0: 19 passed
  • net48: 19 passed
  • dotnet test .\Toolkit.Modern.Tests\ByteForge.Toolkit.Modern.Tests.csproj --configuration Debug --no-restore
  • net9.0: 967 passed
  • net48: 967 passed

● Generate unique compressed attachment zip names for concurrent runs.
● Add regression coverage for repeated mail compression operations.
Copilot AI review requested due to automatic review settings May 17, 2026 15:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates mail attachment compression to avoid temporary zip filename collisions by making generated zip paths unique, and adds regression coverage for repeated compression runs.

Changes:

  • Uses UTC timestamp precision plus a GUID when generating compressed attachment temp zip names.
  • Adds a regression test ensuring repeated compression produces distinct zip attachment names.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Toolkit.Modern/Mail/EmailAttachmentHandler.cs Updates compressed attachment temp zip filename generation to include higher precision time and a GUID.
Toolkit.Modern.Tests/Unit/Mail/EmailAttachmentHandlerTests.cs Adds a unit test covering repeated compression operations with unique zip names.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@PaulStSmith PaulStSmith changed the base branch from develop to master May 17, 2026 15:53
@PaulStSmith PaulStSmith merged commit 31e8f10 into master May 17, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants