Skip to content

Trace out errno when writing extracted files fails in single-file - #121820

Merged
elinor-fung merged 3 commits into
dotnet:mainfrom
elinor-fung:sf-extract-trace
Nov 20, 2025
Merged

elinor-fung merged 3 commits into
dotnet:mainfrom
elinor-fung:sf-extract-trace

Conversation

@elinor-fung

Copy link
Copy Markdown
Member

Related: #120653

cc @dotnet/appmodel @AaronRobinsonMSFT

Copilot AI review requested due to automatic review settings November 19, 2025 21:27
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @agocke, @vitek-karas, @VSadov
See info in area-owners.md if you want to be subscribed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 enhances error diagnostics in single-file bundle extraction by capturing and logging errno values when file write operations fail. The changes add system error details (error message and code) to help diagnose I/O failures during bundle extraction.

  • Added verbose logging to trace file extraction with size information
  • Captured errno immediately after failed fwrite operations for both compressed and uncompressed files
  • Enhanced error messages to include strerror output and errno codes

@agocke agocke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, although there's also a function called "explain_fwrite" and I can't figure out if it's more appropriate to call here

@elinor-fung

Copy link
Copy Markdown
Member Author

I had found an explain_fwrite as well, but unless we're talking about different ones, it is a third party library and not standard C or posix.

@elinor-fung
elinor-fung merged commit db5e84a into dotnet:main Nov 20, 2025
@elinor-fung
elinor-fung deleted the sf-extract-trace branch November 20, 2025 18:20
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants