Skip to content

Conversation

@nabil-Tounarti
Copy link
Contributor

No description provided.

@nabil-Tounarti nabil-Tounarti self-assigned this Nov 7, 2025
Copy link

Copilot AI left a comment

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 improves the cleanup behavior in the download_file function by changing the error handling logic to only delete the failed file instead of removing the entire parent directory, preventing accidental deletion of existing directories when a file write fails.

Key changes:

  • Modified cleanup logic to remove only the failed file instead of the parent directory when write operations fail
  • Added error variable capture for better error logging
  • Added comprehensive test coverage for the new cleanup behavior

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

@nabil-Tounarti nabil-Tounarti merged commit c7fcbb9 into main Nov 7, 2025
7 checks passed
@nabil-Tounarti nabil-Tounarti deleted the bugfix/preserve-parent-dir-on-write-error branch November 7, 2025 16:21
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