Skip to content

Conversation

@jpnurmi
Copy link
Collaborator

@jpnurmi jpnurmi commented Jun 2, 2025

Fixes two issues when writing raw envelopes with sentry_envelope_write_to_file():

  • the file was not closed
  • the return value was 1 on success

These issues came up while experimenting with a custom disk transport for sentry-dotnet that tries to move the file after it has been written, which fails on Windows:

System.IO.IOException: The process cannot access the file because it is being used by another process., at System.IO.FileSystem.MoveFile(String, String, Boolean)

@jpnurmi jpnurmi force-pushed the fix/write-raw-envelope branch from c5b9796 to ea6baea Compare June 2, 2025 07:49
@jpnurmi jpnurmi requested a review from supervacuus June 2, 2025 08:29
Copy link
Collaborator

@supervacuus supervacuus left a comment

Choose a reason for hiding this comment

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

Nice catch. Thanks!

@jpnurmi jpnurmi merged commit 9c09503 into master Jun 2, 2025
35 checks passed
@jpnurmi jpnurmi deleted the fix/write-raw-envelope branch June 2, 2025 08:54
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.

3 participants