Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement retry mechanism for deletion errors #17

Merged
merged 4 commits into from
Jun 21, 2024

Conversation

DubyaDude
Copy link
Collaborator

@DubyaDude DubyaDude commented Jun 21, 2024

This PR was entirely made using Github Copilot Workspace.
Some small optimizations need to be done before merging.


Closes #16

Implements a retry mechanism for file and directory deletion operations, enhancing error handling and user interaction.

  • Error Handling Enhancements

    • Adds TryDeleteDirectoryWithRetry and TryDeleteFileWithRetry methods in Utils.cs to attempt deletion with a retry mechanism. These methods loop until the operation succeeds, the user decides to skip, or the user quits the program.
    • Incorporates user prompts within the retry mechanism, offering options to retry, skip, or quit upon encountering deletion errors.
  • Integration with Existing Code

    • Utilizes the new retry mechanism methods in BoothBatchDownloader.cs for deleting directories and files. This ensures that if a deletion fails, the user is prompted with options to handle the error gracefully.
    • Modifies directory and file deletion logic to use the retry mechanism, improving robustness against locked files or other deletion errors.

For more details, open the Copilot Workspace session.

@DubyaDude DubyaDude merged commit 9913679 into master Jun 21, 2024
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.

[Internal] Deletion errors causing program to end when trying to delete.
1 participant