Skip to content

feat: cleanup temp rip directory after successful encode process#49

Merged
mapitman merged 4 commits intomainfrom
deal-with-tempfiles
Jan 25, 2026
Merged

feat: cleanup temp rip directory after successful encode process#49
mapitman merged 4 commits intomainfrom
deal-with-tempfiles

Conversation

@mapitman
Copy link
Copy Markdown
Owner

Choose a random dir name when no temp dir is supplied.
Clean up tempfiles when the rip/encode process is successful.

Copilot AI review requested due to automatic review settings January 25, 2026 23:02
Copy link
Copy Markdown
Contributor

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 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 .makemkv to 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.

Comment thread src/RipSharp/Services/DiscRipper.cs
Comment thread src/RipSharp/Services/DiscRipper.cs
mapitman and others added 3 commits January 25, 2026 15:11
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
@mapitman mapitman merged commit 6287b3f into main Jan 25, 2026
1 check passed
@mapitman mapitman deleted the deal-with-tempfiles branch January 25, 2026 23:27
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.

2 participants