Skip to content

Correct cleanup of temporary directories after multiple file uploads - #120

Merged
msoap merged 1 commit into
masterfrom
clean_multiple_upload_dir
Aug 8, 2026
Merged

Correct cleanup of temporary directories after multiple file uploads#120
msoap merged 1 commit into
masterfrom
clean_multiple_upload_dir

Conversation

@msoap

@msoap msoap commented Aug 8, 2026

Copy link
Copy Markdown
Owner

fixes: #119

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Fixes the reported issue where only the last temporary upload directory was cleaned up when multiple files are uploaded in a single request, by tracking and removing all created temp directories.

Changes:

  • Track multiple upload temp directories (tempDirs) and remove them all in the finalizer.
  • Replace deprecated ioutil.TempDir/TempFile usage with os.MkdirTemp/CreateTemp.
  • Bump github.com/mattn/go-shellwords and github.com/msoap/raphanus module versions.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
shell2http.go Track all temp upload directories and clean them up; switch to os.MkdirTemp/CreateTemp.
go.mod Bump dependency versions for go-shellwords and raphanus.
go.sum Update checksums for the bumped dependency versions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread shell2http.go
Comment thread go.mod
@msoap
msoap merged commit f645622 into master Aug 8, 2026
3 checks passed
@msoap
msoap deleted the clean_multiple_upload_dir branch August 8, 2026 14:36
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.

Temporary files are not automatically removed.

2 participants