feat: cleanup temp rip directory after successful encode process#49
Merged
feat: cleanup temp rip directory after successful encode process#49
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances temp directory management by using randomly-named temp directories and automatically cleaning them up after successful processing.
Changes:
- Modified temp directory naming from fixed
.makemkvto random string format (.{8 alphanumeric chars}) - Added automatic cleanup of temp directories after successful rip/encode operations
- Updated help text to reflect the new temp directory naming scheme
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/RipSharp/Core/RipOptions.cs | Implements random temp directory name generation and updates help text |
| src/RipSharp/Services/DiscRipper.cs | Adds cleanup logic for temp directories with safety checks |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Add TempWasAutoGenerated flag to RipOptions to track whether temp directory was auto-generated - Modify CleanupTempDirectory to only delete auto-generated temp directories - Preserve user-specified temp directories to prevent accidental data loss - Addresses PR review feedback about safety of cleanup operation
- Update tests to verify temp directories use random 8-char names starting with dot - Verify TempWasAutoGenerated flag is set correctly for auto-generated directories - Ensure flag is false for user-specified temp directories
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Choose a random dir name when no temp dir is supplied.
Clean up tempfiles when the rip/encode process is successful.